mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-28 01:49:23 +01:00
Fix crash when signing out.
At this point, we do not want the sync to start, the DB is already deleted.
This commit is contained in:
parent
9b57630eae
commit
32bfaf8868
@ -70,7 +70,7 @@ class ActiveSessionHolder @Inject constructor(
|
||||
|
||||
suspend fun clearActiveSession() {
|
||||
// Do some cleanup first
|
||||
getSafeActiveSession()?.let {
|
||||
getSafeActiveSession(startSync = false)?.let {
|
||||
Timber.w("clearActiveSession of ${it.myUserId}")
|
||||
it.callSignalingService().removeCallListener(callManager)
|
||||
it.removeListener(sessionListener)
|
||||
@ -91,8 +91,8 @@ class ActiveSessionHolder @Inject constructor(
|
||||
return activeSessionReference.get() != null || authenticationService.hasAuthenticatedSessions()
|
||||
}
|
||||
|
||||
fun getSafeActiveSession(): Session? {
|
||||
return runBlocking { getOrInitializeSession(startSync = true) }
|
||||
fun getSafeActiveSession(startSync: Boolean = true): Session? {
|
||||
return runBlocking { getOrInitializeSession(startSync = startSync) }
|
||||
}
|
||||
|
||||
fun getActiveSession(): Session {
|
||||
|
Loading…
x
Reference in New Issue
Block a user