Merge pull request #3110 from element-hq/fix/jme/session-verification-state-with-no-network
Fix incorrect 'device verified' screen when app was opened with no network connection
This commit is contained in:
commit
1419703059
2 changed files with 45 additions and 12 deletions
|
|
@ -119,8 +119,14 @@ class DefaultFtueService @Inject constructor(
|
|||
emit(SessionVerifiedStatus.NotVerified)
|
||||
}
|
||||
.first()
|
||||
val skipVerification = suspend { sessionPreferencesStore.isSessionVerificationSkipped().first() }
|
||||
return readyVerifiedSessionStatus == SessionVerifiedStatus.NotVerified && !skipVerification()
|
||||
// For some obscure reason we need to call this *before* we check the `readyVerifiedSessionStatus`, otherwise there's a deadlock
|
||||
// It seems like a DataStore bug
|
||||
val skipVerification = canSkipVerification()
|
||||
return readyVerifiedSessionStatus == SessionVerifiedStatus.NotVerified && !skipVerification
|
||||
}
|
||||
|
||||
private suspend fun canSkipVerification(): Boolean {
|
||||
return sessionPreferencesStore.isSessionVerificationSkipped().first()
|
||||
}
|
||||
|
||||
private suspend fun needsAnalyticsOptIn(): Boolean {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue