mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-02 20:26:47 +01:00
Ensure Background sync is not stopped when there is an active call, even when the app goes to background.
This commit is contained in:
parent
84158ece37
commit
8d85d047b7
@ -189,11 +189,15 @@ class VectorApplication :
|
||||
fcmHelper.onEnterBackground(activeSessionHolder)
|
||||
|
||||
if (stopBackgroundSync) {
|
||||
Timber.i("App entered background: stop any background sync")
|
||||
activeSessionHolder.getSafeActiveSessionAsync {
|
||||
it?.syncService()?.stopAnyBackgroundSync()
|
||||
if (webRtcCallManager.currentCall.get() == null) {
|
||||
Timber.i("App entered background: stop any background sync")
|
||||
activeSessionHolder.getSafeActiveSessionAsync {
|
||||
it?.syncService()?.stopAnyBackgroundSync()
|
||||
}
|
||||
stopBackgroundSync = false
|
||||
} else {
|
||||
Timber.i("App entered background: there is an active call do not stop background sync")
|
||||
}
|
||||
stopBackgroundSync = false
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user