Improve readability
This commit is contained in:
parent
baf117e8fa
commit
cc1c3c8f7b
1 changed files with 6 additions and 4 deletions
|
|
@ -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 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue