mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 17:35:54 +03:00
always trigger guard service start when a session is activated
- fixes missing guard after login
This commit is contained in:
parent
c14ffefe7c
commit
ace9f89569
2 changed files with 4 additions and 3 deletions
|
@ -44,7 +44,6 @@ import im.vector.app.core.di.ActiveSessionHolder
|
|||
import im.vector.app.core.extensions.configureAndStart
|
||||
import im.vector.app.core.extensions.startSyncing
|
||||
import im.vector.app.core.rx.RxConfig
|
||||
import im.vector.app.core.services.GuardServiceStarter
|
||||
import im.vector.app.features.call.webrtc.WebRtcCallManager
|
||||
import im.vector.app.features.configuration.VectorConfiguration
|
||||
import im.vector.app.features.disclaimer.doNotShowDisclaimerDialog
|
||||
|
@ -166,7 +165,6 @@ class VectorApplication :
|
|||
if (authenticationService.hasAuthenticatedSessions() && !activeSessionHolder.hasActiveSession()) {
|
||||
val lastAuthenticatedSession = authenticationService.getLastAuthenticatedSession()!!
|
||||
activeSessionHolder.setActiveSession(lastAuthenticatedSession)
|
||||
guardServiceStarter.start()
|
||||
lastAuthenticatedSession.configureAndStart(applicationContext, startSyncing = false)
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ package im.vector.app.core.di
|
|||
|
||||
import arrow.core.Option
|
||||
import im.vector.app.ActiveSessionDataSource
|
||||
import im.vector.app.core.services.GuardServiceStarter
|
||||
import im.vector.app.features.call.webrtc.WebRtcCallManager
|
||||
import im.vector.app.features.crypto.keysrequest.KeyRequestHandler
|
||||
import im.vector.app.features.crypto.verification.IncomingVerificationRequestHandler
|
||||
|
@ -36,7 +37,8 @@ class ActiveSessionHolder @Inject constructor(private val sessionObservableStore
|
|||
private val callManager: WebRtcCallManager,
|
||||
private val pushRuleTriggerListener: PushRuleTriggerListener,
|
||||
private val sessionListener: SessionListener,
|
||||
private val imageManager: ImageManager
|
||||
private val imageManager: ImageManager,
|
||||
private val guardServiceStarter: GuardServiceStarter
|
||||
) {
|
||||
|
||||
private var activeSession: AtomicReference<Session?> = AtomicReference()
|
||||
|
@ -52,6 +54,7 @@ class ActiveSessionHolder @Inject constructor(private val sessionObservableStore
|
|||
pushRuleTriggerListener.startWithSession(session)
|
||||
session.callSignalingService().addCallListener(callManager)
|
||||
imageManager.onSessionStarted(session)
|
||||
guardServiceStarter.start()
|
||||
}
|
||||
|
||||
fun clearActiveSession() {
|
||||
|
|
Loading…
Reference in a new issue