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 17, 2024
1 parent 5a85166 commit 334653f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,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 334653f

Please sign in to comment.