mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-27 11:28:33 +03:00
Reimplements soft logout simulation
This commit is contained in:
parent
dab866d170
commit
448e8e001f
2 changed files with 4 additions and 2 deletions
|
@ -18,6 +18,7 @@ package org.matrix.android.sdk.internal.session.sync
|
|||
|
||||
import android.os.SystemClock
|
||||
import okhttp3.ResponseBody
|
||||
import org.matrix.android.sdk.api.failure.GlobalError
|
||||
import org.matrix.android.sdk.api.logger.LoggerTag
|
||||
import org.matrix.android.sdk.api.session.Session
|
||||
import org.matrix.android.sdk.api.session.initsync.InitSyncStep
|
||||
|
@ -151,6 +152,7 @@ internal class DefaultSyncTask @Inject constructor(
|
|||
defaultSyncStatusService.setStatus(SyncStatusService.Status.IncrementalSyncIdle)
|
||||
val syncResponse = try {
|
||||
executeRequest(globalErrorReceiver) {
|
||||
globalErrorReceiver.handleGlobalError(GlobalError.InvalidToken(softLogout = true))
|
||||
syncAPI.sync(
|
||||
params = requestParams,
|
||||
readTimeOut = readTimeOut
|
||||
|
|
|
@ -60,7 +60,7 @@ data class MainActivityArgs(
|
|||
val clearCredentials: Boolean = false,
|
||||
val isUserLoggedOut: Boolean = false,
|
||||
val isAccountDeactivated: Boolean = false,
|
||||
val isSoftLogout: Boolean = true
|
||||
val isSoftLogout: Boolean = false
|
||||
) : Parcelable
|
||||
|
||||
/**
|
||||
|
@ -135,7 +135,7 @@ class MainActivity : VectorBaseActivity<ActivityMainBinding>(), UnlockedActivity
|
|||
clearCredentials = argsFromIntent?.clearCredentials ?: false,
|
||||
isUserLoggedOut = argsFromIntent?.isUserLoggedOut ?: false,
|
||||
isAccountDeactivated = argsFromIntent?.isAccountDeactivated ?: false,
|
||||
isSoftLogout = argsFromIntent?.isSoftLogout ?: true
|
||||
isSoftLogout = argsFromIntent?.isSoftLogout ?: false
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue