mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Improve readability
This commit is contained in:
committed by
Benoit Marty
parent
baf117e8fa
commit
cc1c3c8f7b
@@ -96,11 +96,13 @@ class RootFlowNode @AssistedInject constructor(
|
|||||||
matrixClientsHolder.removeAll()
|
matrixClientsHolder.removeAll()
|
||||||
}
|
}
|
||||||
) { isLoggedIn, cacheIdx -> isLoggedIn to cacheIdx }
|
) { isLoggedIn, cacheIdx -> isLoggedIn to cacheIdx }
|
||||||
.onEach { isLoggedIn ->
|
.onEach { pair ->
|
||||||
Timber.v("isLoggedIn=$isLoggedIn")
|
val isLoggedIn = pair.first
|
||||||
if (isLoggedIn.first) {
|
val cacheIndex = pair.second
|
||||||
|
Timber.v("isLoggedIn=$isLoggedIn, cacheIndex=$cacheIndex")
|
||||||
|
if (isLoggedIn) {
|
||||||
tryToRestoreLatestSession(
|
tryToRestoreLatestSession(
|
||||||
onSuccess = { switchToLoggedInFlow(it, isLoggedIn.second) },
|
onSuccess = { switchToLoggedInFlow(it, cacheIndex) },
|
||||||
onFailure = { switchToNotLoggedInFlow() }
|
onFailure = { switchToNotLoggedInFlow() }
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user