Skip to content

Commit

Permalink
feat: Always reset the ui state when the state is handled in Launched…
Browse files Browse the repository at this point in the history
…Effect
  • Loading branch information
LunarX committed Dec 20, 2024
1 parent 9945ab7 commit 8c4265a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,13 @@ private fun HandleSendActionResult(

LaunchedEffect(sendStatus()) {
when (val actionResult = sendStatus()) {
is SendStatus.Success -> navigateToUploadProgress(transferType(), actionResult.totalSize)
is SendStatus.Success -> {
navigateToUploadProgress(transferType(), actionResult.totalSize)
resetSendActionResult()
}
is SendStatus.Refused -> {
snackbarHostState.showSnackbar(context.getString(R.string.errorAppIntegrity))
resetSendActionResult()
}
is SendStatus.Failure -> {
snackbarHostState.showSnackbar(context.getString(R.string.errorUnknown))
Expand Down

0 comments on commit 8c4265a

Please sign in to comment.