Use LaunchedEffect and improve test

This commit is contained in:
Valere 2024-05-07 10:41:08 +02:00
parent 3170691a2f
commit a8f5c8db39
2 changed files with 18 additions and 13 deletions

View file

@ -71,7 +71,9 @@ class LoggedInPresenter @Inject constructor(
}
val verificationState by sessionVerificationService.sessionVerifiedStatus.collectAsState()
val recoveryState by encryptionService.recoveryStateStateFlow.collectAsState()
reportCryptoStatusToAnalytics(verificationState, recoveryState)
LaunchedEffect(verificationState, recoveryState) {
reportCryptoStatusToAnalytics(verificationState, recoveryState)
}
return LoggedInState(
showSyncSpinner = showSyncSpinner,