Ensure we only send ReceiveFirstIntent once (#701)

This commit is contained in:
Brian Yencho 2024-01-21 11:35:39 -06:00 committed by Álison Fernandes
parent ffba00bf83
commit 99f5325580

View file

@ -32,11 +32,13 @@ class MainActivity : AppCompatActivity() {
installSplashScreen().setKeepOnScreenCondition { shouldShowSplashScreen } installSplashScreen().setKeepOnScreenCondition { shouldShowSplashScreen }
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
mainViewModel.trySendAction( if (savedInstanceState == null) {
MainAction.ReceiveFirstIntent( mainViewModel.trySendAction(
intent = intent, MainAction.ReceiveFirstIntent(
), intent = intent,
) ),
)
}
// Within the app the language will change dynamically and will be managed // Within the app the language will change dynamically and will be managed
// by the OS, but we need to ensure we properly set the language when // by the OS, but we need to ensure we properly set the language when