[MatrixSDK] finish mapping timeline and makes it compile
This commit is contained in:
@@ -119,14 +119,15 @@ class RootFlowNode @AssistedInject constructor(
|
||||
onSuccess(latestKnownUserId)
|
||||
return
|
||||
}
|
||||
val matrixClient = authenticationService.restoreSession(UserId(latestKnownUserId.value))
|
||||
if (matrixClient == null) {
|
||||
Timber.v("Failed to restore session...")
|
||||
onFailure()
|
||||
} else {
|
||||
matrixClientsHolder.add(matrixClient)
|
||||
onSuccess(matrixClient.sessionId)
|
||||
}
|
||||
authenticationService.restoreSession(UserId(latestKnownUserId.value))
|
||||
.onSuccess { matrixClient ->
|
||||
matrixClientsHolder.add(matrixClient)
|
||||
onSuccess(matrixClient.sessionId)
|
||||
}
|
||||
.onFailure {
|
||||
Timber.v("Failed to restore session...")
|
||||
onFailure()
|
||||
}
|
||||
}
|
||||
|
||||
private fun onOpenBugReport() {
|
||||
|
||||
@@ -64,10 +64,13 @@ class MatrixClientsHolder @Inject constructor(private val authenticationService:
|
||||
runBlocking {
|
||||
userIds.forEach { userId ->
|
||||
Timber.v("Restore matrix session: $userId")
|
||||
val matrixClient = authenticationService.restoreSession(userId)
|
||||
if (matrixClient != null) {
|
||||
add(matrixClient)
|
||||
}
|
||||
authenticationService.restoreSession(userId)
|
||||
.onSuccess { matrixClient ->
|
||||
add(matrixClient)
|
||||
}
|
||||
.onFailure {
|
||||
Timber.e("Fail to restore session")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user