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()
|
||||
}
|
||||
) { isLoggedIn, cacheIdx -> isLoggedIn to cacheIdx }
|
||||
.onEach { isLoggedIn ->
|
||||
Timber.v("isLoggedIn=$isLoggedIn")
|
||||
if (isLoggedIn.first) {
|
||||
.onEach { pair ->
|
||||
val isLoggedIn = pair.first
|
||||
val cacheIndex = pair.second
|
||||
Timber.v("isLoggedIn=$isLoggedIn, cacheIndex=$cacheIndex")
|
||||
if (isLoggedIn) {
|
||||
tryToRestoreLatestSession(
|
||||
onSuccess = { switchToLoggedInFlow(it, isLoggedIn.second) },
|
||||
onSuccess = { switchToLoggedInFlow(it, cacheIndex) },
|
||||
onFailure = { switchToNotLoggedInFlow() }
|
||||
)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue