Daniel
02/27/2021, 11:26 PMremember
Rahul Sainani
02/27/2021, 11:28 PMRahul Sainani
02/27/2021, 11:32 PMremember
doesn't work exactly like that but rememberSaveable
with a flag like isFirstComposition does solve it but was searching for a recommended pattern, does that clarify the issue?Zach Klippenstein (he/him) [MOD]
02/27/2021, 11:34 PMDisposableEffect
and LaunchedEffect
Rahul Sainani
02/27/2021, 11:45 PM// part of SplashScreen
LaunchedEffect(Unit) {
// Gets called on coming back from home as well
navController.navigate(Route.home) {}
}
Zach Klippenstein (he/him) [MOD]
02/27/2021, 11:51 PMrememberSaveable
to set a flag the first time it’s ran, so that when it’s navigated back to the flag would be restored and you could avoid re-executing code.Zach Klippenstein (he/him) [MOD]
02/27/2021, 11:52 PMRahul Sainani
02/27/2021, 11:57 PM