forked from GitHub-Mirror/riotX-android
Fix / signout sign-in not working
This commit is contained in:
@ -81,13 +81,11 @@ interface Session :
|
||||
/**
|
||||
* This method start the sync thread.
|
||||
*/
|
||||
@MainThread
|
||||
fun startSync()
|
||||
|
||||
/**
|
||||
* This method stop the sync thread.
|
||||
*/
|
||||
@MainThread
|
||||
fun stopSync()
|
||||
|
||||
/**
|
||||
@ -99,7 +97,6 @@ interface Session :
|
||||
/**
|
||||
* This method allow to close a session. It does stop some services.
|
||||
*/
|
||||
@MainThread
|
||||
fun close()
|
||||
|
||||
/**
|
||||
|
@ -102,7 +102,6 @@ internal class DefaultSession @Inject constructor(override val sessionParams: Se
|
||||
SyncWorker.stopAnyBackgroundSync(context)
|
||||
}
|
||||
|
||||
@MainThread
|
||||
override fun startSync() {
|
||||
assert(isOpen)
|
||||
if (!syncThread.isAlive) {
|
||||
@ -113,16 +112,14 @@ internal class DefaultSession @Inject constructor(override val sessionParams: Se
|
||||
}
|
||||
}
|
||||
|
||||
@MainThread
|
||||
override fun stopSync() {
|
||||
assert(isOpen)
|
||||
syncThread.kill()
|
||||
}
|
||||
|
||||
@MainThread
|
||||
override fun close() {
|
||||
assertMainThread()
|
||||
assert(isOpen)
|
||||
stopSync()
|
||||
liveEntityObservers.forEach { it.dispose() }
|
||||
cryptoService.close()
|
||||
if (monarchy.isMonarchyThreadOpen) {
|
||||
|
Reference in New Issue
Block a user