mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-28 03:48:37 +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 android.os.SystemClock
|
||||||
import okhttp3.ResponseBody
|
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.logger.LoggerTag
|
||||||
import org.matrix.android.sdk.api.session.Session
|
import org.matrix.android.sdk.api.session.Session
|
||||||
import org.matrix.android.sdk.api.session.initsync.InitSyncStep
|
import org.matrix.android.sdk.api.session.initsync.InitSyncStep
|
||||||
|
@ -151,6 +152,7 @@ internal class DefaultSyncTask @Inject constructor(
|
||||||
defaultSyncStatusService.setStatus(SyncStatusService.Status.IncrementalSyncIdle)
|
defaultSyncStatusService.setStatus(SyncStatusService.Status.IncrementalSyncIdle)
|
||||||
val syncResponse = try {
|
val syncResponse = try {
|
||||||
executeRequest(globalErrorReceiver) {
|
executeRequest(globalErrorReceiver) {
|
||||||
|
globalErrorReceiver.handleGlobalError(GlobalError.InvalidToken(softLogout = true))
|
||||||
syncAPI.sync(
|
syncAPI.sync(
|
||||||
params = requestParams,
|
params = requestParams,
|
||||||
readTimeOut = readTimeOut
|
readTimeOut = readTimeOut
|
||||||
|
|
|
@ -60,7 +60,7 @@ data class MainActivityArgs(
|
||||||
val clearCredentials: Boolean = false,
|
val clearCredentials: Boolean = false,
|
||||||
val isUserLoggedOut: Boolean = false,
|
val isUserLoggedOut: Boolean = false,
|
||||||
val isAccountDeactivated: Boolean = false,
|
val isAccountDeactivated: Boolean = false,
|
||||||
val isSoftLogout: Boolean = true
|
val isSoftLogout: Boolean = false
|
||||||
) : Parcelable
|
) : Parcelable
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -135,7 +135,7 @@ class MainActivity : VectorBaseActivity<ActivityMainBinding>(), UnlockedActivity
|
||||||
clearCredentials = argsFromIntent?.clearCredentials ?: false,
|
clearCredentials = argsFromIntent?.clearCredentials ?: false,
|
||||||
isUserLoggedOut = argsFromIntent?.isUserLoggedOut ?: false,
|
isUserLoggedOut = argsFromIntent?.isUserLoggedOut ?: false,
|
||||||
isAccountDeactivated = argsFromIntent?.isAccountDeactivated ?: false,
|
isAccountDeactivated = argsFromIntent?.isAccountDeactivated ?: false,
|
||||||
isSoftLogout = argsFromIntent?.isSoftLogout ?: true
|
isSoftLogout = argsFromIntent?.isSoftLogout ?: false
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue