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 {
|
authenticator.getLastActiveSession()?.also {
|
||||||
currentSession = it
|
currentSession = it
|
||||||
it.open()
|
it.open()
|
||||||
it.start()
|
it.startSync()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,13 +54,13 @@ interface Session :
|
||||||
* This method start the sync thread.
|
* This method start the sync thread.
|
||||||
*/
|
*/
|
||||||
@MainThread
|
@MainThread
|
||||||
fun start()
|
fun startSync()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method stop the sync thread.
|
* This method stop the sync thread.
|
||||||
*/
|
*/
|
||||||
@MainThread
|
@MainThread
|
||||||
fun stop()
|
fun stopSync()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method allow to close a session. It does stop some services.
|
* 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
|
@MainThread
|
||||||
override fun start() {
|
override fun startSync() {
|
||||||
assert(isOpen)
|
assert(isOpen)
|
||||||
syncThread.start()
|
syncThread.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
@MainThread
|
@MainThread
|
||||||
override fun stop() {
|
override fun stopSync() {
|
||||||
assert(isOpen)
|
assert(isOpen)
|
||||||
syncThread.kill()
|
syncThread.kill()
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ internal class DefaultSession(override val sessionParams: SessionParams) : Sessi
|
||||||
return signOutService.signOut(object : MatrixCallback<Unit> {
|
return signOutService.signOut(object : MatrixCallback<Unit> {
|
||||||
override fun onSuccess(data: Unit) {
|
override fun onSuccess(data: Unit) {
|
||||||
// Close the session
|
// Close the session
|
||||||
stop()
|
stopSync()
|
||||||
close()
|
close()
|
||||||
|
|
||||||
callback.onSuccess(data)
|
callback.onSuccess(data)
|
||||||
|
|
|
@ -67,7 +67,7 @@ class LoginActivity : VectorBaseActivity() {
|
||||||
Matrix.getInstance().currentSession = data
|
Matrix.getInstance().currentSession = data
|
||||||
data.open()
|
data.open()
|
||||||
data.setFilter(FilterService.FilterPreset.RiotFilter)
|
data.setFilter(FilterService.FilterPreset.RiotFilter)
|
||||||
data.start()
|
data.startSync()
|
||||||
|
|
||||||
goToHome()
|
goToHome()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue