forked from GitHub-Mirror/riotX-android
Rename APIs
This commit is contained in:
parent
4c02721ada
commit
ab7b807740
@ -53,7 +53,7 @@ class Matrix private constructor(context: Context) : MatrixKoinComponent {
|
||||
authenticator.getLastActiveSession()?.also {
|
||||
currentSession = it
|
||||
it.open()
|
||||
it.start()
|
||||
it.startSync()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,13 +54,13 @@ interface Session :
|
||||
* This method start the sync thread.
|
||||
*/
|
||||
@MainThread
|
||||
fun start()
|
||||
fun startSync()
|
||||
|
||||
/**
|
||||
* This method stop the sync thread.
|
||||
*/
|
||||
@MainThread
|
||||
fun stop()
|
||||
fun stopSync()
|
||||
|
||||
/**
|
||||
* This method allow to close a session. It does stop some services.
|
||||
|
@ -92,13 +92,13 @@ internal class DefaultSession(override val sessionParams: SessionParams) : Sessi
|
||||
}
|
||||
|
||||
@MainThread
|
||||
override fun start() {
|
||||
override fun startSync() {
|
||||
assert(isOpen)
|
||||
syncThread.start()
|
||||
}
|
||||
|
||||
@MainThread
|
||||
override fun stop() {
|
||||
override fun stopSync() {
|
||||
assert(isOpen)
|
||||
syncThread.kill()
|
||||
}
|
||||
@ -121,7 +121,7 @@ internal class DefaultSession(override val sessionParams: SessionParams) : Sessi
|
||||
return signOutService.signOut(object : MatrixCallback<Unit> {
|
||||
override fun onSuccess(data: Unit) {
|
||||
// Close the session
|
||||
stop()
|
||||
stopSync()
|
||||
close()
|
||||
|
||||
callback.onSuccess(data)
|
||||
|
@ -67,7 +67,7 @@ class LoginActivity : VectorBaseActivity() {
|
||||
Matrix.getInstance().currentSession = data
|
||||
data.open()
|
||||
data.setFilter(FilterService.FilterPreset.RiotFilter)
|
||||
data.start()
|
||||
data.startSync()
|
||||
|
||||
goToHome()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user