[MatrixSDK] finish mapping timeline and makes it compile
This commit is contained in:
parent
fb85f35525
commit
801eecfe8d
44 changed files with 370 additions and 242 deletions
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue