mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Ensure that the code is not run twice.
This commit is contained in:
committed by
Benoit Marty
parent
acde970f01
commit
101a6e6ff2
@@ -53,11 +53,9 @@ class LoggedInPresenter @Inject constructor(
|
|||||||
sessionVerificationService.sessionVerifiedStatus.map { it == SessionVerifiedStatus.Verified }
|
sessionVerificationService.sessionVerifiedStatus.map { it == SessionVerifiedStatus.Verified }
|
||||||
}.collectAsState(initial = false)
|
}.collectAsState(initial = false)
|
||||||
|
|
||||||
LaunchedEffect(isVerified) {
|
if (isVerified) {
|
||||||
if (isVerified) {
|
LaunchedEffect(Unit) {
|
||||||
ensurePusherIsRegistered()
|
ensurePusherIsRegistered()
|
||||||
} else {
|
|
||||||
Timber.w("Session is not verified, not registering pusher")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user