forked from GitHub-Mirror/riotX-android
Move to sdk
This commit is contained in:
parent
a1ddd73d7d
commit
95d64008aa
@ -20,6 +20,7 @@ import android.content.Context
|
||||
import android.os.Looper
|
||||
import androidx.annotation.MainThread
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.work.WorkManager
|
||||
import com.zhuinden.monarchy.Monarchy
|
||||
import im.vector.matrix.android.api.MatrixCallback
|
||||
import im.vector.matrix.android.api.auth.data.SessionParams
|
||||
@ -150,6 +151,11 @@ internal class DefaultSession @Inject constructor(override val sessionParams: Se
|
||||
override fun onSuccess(data: Unit) {
|
||||
Timber.w("SIGN_OUT: clear cache -> SUCCESS: clear crypto cache")
|
||||
cryptoService.clearCryptoCache(MatrixCallbackDelegate(callback))
|
||||
|
||||
WorkManager.getInstance(context).also {
|
||||
it.cancelAllWork()
|
||||
it.pruneWork()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFailure(failure: Throwable) {
|
||||
|
@ -19,7 +19,6 @@ package im.vector.riotredesign.features
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import androidx.work.WorkManager
|
||||
import im.vector.matrix.android.api.Matrix
|
||||
import im.vector.matrix.android.api.MatrixCallback
|
||||
import im.vector.matrix.android.api.auth.Authenticator
|
||||
@ -67,10 +66,6 @@ class MainActivity : VectorBaseActivity() {
|
||||
override fun onSuccess(data: Unit) {
|
||||
Timber.w("SIGN_OUT: success, start app")
|
||||
sessionHolder.clearActiveSession()
|
||||
WorkManager.getInstance(applicationContext).also {
|
||||
it.cancelAllWork()
|
||||
it.pruneWork()
|
||||
}
|
||||
start()
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user