[WIP] Fix Play services install and sign in flow#2924
Conversation
| MainUiState.OnUserSignedOut | ||
| _mainUiState.value = SignInScreen | ||
| } else { | ||
| Timber.d(error, "Unknown sign in error") |
There was a problem hiding this comment.
Can we make it Timber.e?
| override val signInState: Flow<SignInState> = _signInStateFlow.asStateFlow().filterNotNull() | ||
|
|
||
| override fun initInternal() { | ||
| Timber.d("Listening to Firebase auth state") |
There was a problem hiding this comment.
Can we cleanup debug logs if they aren't needed anymore?
| override fun initInternal() { | ||
| Timber.d("Listening to Firebase auth state") | ||
| firebaseAuth.addAuthStateListener { auth -> | ||
| Timber.d("Firebase auth state changed") |
|
@shobhitagarwal1612 @anandwana001 This actually won't work - collecting the so-called "MainUiState" on resume will navigate the user away from their current screen in many cases (ToS, survey list, etc), since those screens are not represented in the UiState. Filed #2934 to track, moving back to Draft :/ |
|
|
@shobhitagarwal1612 @anandwana001 Do you want to want to pick these up? |
Replaces ephemeral navigation requests with a "main UI state" which gets applied at start up. This patch resolves existing issues, but there are likely several race conditions lurking due to complexity of the startup/install flow. We should revisit the design on this flow to make it easier to understand and to avoid cancellation exceptions or duplicate side effects (#2923).
Fixes #2919 by restore UI state on on resume.
Fixes #2783