allan.conda
07/21/2021, 3:27 AMshowSnackbar
state and clearing it in on result,
If user navigates to another screen before the snackbar result, the composable is not able to update its result because of cancellation.
Then the user goes back to the Composable with a new composition and shows the snackbar again.
Is there a better way of handling snackbarstates? Code in threadallan.conda
07/21/2021, 3:32 AMallan.conda
07/21/2021, 3:33 AMIan Lake
07/21/2021, 4:17 AMshowSnackBar
to false when your coroutine scope is cancelled? Generally, if you want code to run anytime the coroutine scope is completed (whether it completes normally or because the scope was cancelled), you'd put that in the finally
block of `try`/`finally`allan.conda
07/21/2021, 6:10 AMtry/finally
for screens which shows snackbars and can navigate to other screens.
Thank you