mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-22 09:25:49 +03:00
Rename APIs
This commit is contained in:
parent
4c02721ada
commit
ab7b807740
4 changed files with 7 additions and 7 deletions
|
@ -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 a new issue