Skip to content

Commit

Permalink
docs: Add explanatory comment
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Dec 20, 2024
1 parent c0e9009 commit 5f3557c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ private fun HandleSendActionResult(
LaunchedEffect(getSendActionResult()) {
when (val actionResult = getSendActionResult()) {
is SendActionResult.Success -> {
// If the user cancels the transfer while in UploadProgress, we're gonna popBackStack to ImportFiles.
// If we don't reset the ImportFiles state machine, we'll automatically navigate-back to UploadProgress again.
// So, before leaving ImportFiles to go to UploadProgress, we need to reset the ImportFiles state machine.
// TODO: Maybe merging the 2 screens state machines into 1 could help simplify this ?
resetSendActionResult()
navigateToUploadProgress(transferType(), actionResult.totalSize)
}
Expand Down

0 comments on commit 5f3557c

Please sign in to comment.