Rename APIs

This commit is contained in:
Benoit Marty 2019-04-16 15:36:29 +02:00 committed by Benoit Marty
parent 4c02721ada
commit ab7b807740
4 changed files with 7 additions and 7 deletions

View File

@ -53,7 +53,7 @@ class Matrix private constructor(context: Context) : MatrixKoinComponent {
authenticator.getLastActiveSession()?.also {
currentSession = it
it.open()
it.start()
it.startSync()
}
}


View File

@ -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.

View File

@ -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)

View File

@ -67,7 +67,7 @@ class LoginActivity : VectorBaseActivity() {
Matrix.getInstance().currentSession = data
data.open()
data.setFilter(FilterService.FilterPreset.RiotFilter)
data.start()
data.startSync()

goToHome()
}