Ensure that the code is not run twice.

This commit is contained in:
Benoit Marty 2024-06-14 12:30:41 +02:00 committed by Benoit Marty
parent acde970f01
commit 101a6e6ff2

View file

@ -53,11 +53,9 @@ class LoggedInPresenter @Inject constructor(
sessionVerificationService.sessionVerifiedStatus.map { it == SessionVerifiedStatus.Verified }
}.collectAsState(initial = false)
LaunchedEffect(isVerified) {
if (isVerified) {
if (isVerified) {
LaunchedEffect(Unit) {
ensurePusherIsRegistered()
} else {
Timber.w("Session is not verified, not registering pusher")
}
}