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 18, 2024
1 parent eef16c4 commit fb4c0fb
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,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 fb4c0fb

Please sign in to comment.