mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 19:10:43 +00:00
Code cleanup
This commit is contained in:
+5
-6
@@ -251,18 +251,17 @@ class RustMatrixAuthenticationService @Inject constructor(
|
|||||||
oidcConfiguration = oidcConfiguration,
|
oidcConfiguration = oidcConfiguration,
|
||||||
progressListener = progressListener,
|
progressListener = progressListener,
|
||||||
)
|
)
|
||||||
|
val sessionData = client.use { rustClient ->
|
||||||
client.use { rustClient ->
|
rustClient.session()
|
||||||
val sessionData = rustClient.session()
|
|
||||||
.toSessionData(
|
.toSessionData(
|
||||||
isTokenValid = true,
|
isTokenValid = true,
|
||||||
loginType = LoginType.QR,
|
loginType = LoginType.QR,
|
||||||
passphrase = pendingPassphrase,
|
passphrase = pendingPassphrase,
|
||||||
sessionPaths = emptySessionPaths,
|
sessionPaths = emptySessionPaths,
|
||||||
)
|
)
|
||||||
|
}
|
||||||
sessionStore.storeData(sessionData)
|
sessionStore.storeData(sessionData)
|
||||||
SessionId(sessionData.userId)
|
SessionId(sessionData.userId)
|
||||||
}
|
|
||||||
}.mapFailure {
|
}.mapFailure {
|
||||||
when (it) {
|
when (it) {
|
||||||
is QrCodeDecodeException -> QrErrorMapper.map(it)
|
is QrCodeDecodeException -> QrErrorMapper.map(it)
|
||||||
@@ -291,7 +290,7 @@ class RustMatrixAuthenticationService @Inject constructor(
|
|||||||
passphrase = pendingPassphrase,
|
passphrase = pendingPassphrase,
|
||||||
slidingSyncType = slidingSyncType,
|
slidingSyncType = slidingSyncType,
|
||||||
)
|
)
|
||||||
.run { config() }
|
.config()
|
||||||
.build()
|
.build()
|
||||||
} catch (e: HumanQrLoginException.SlidingSyncNotAvailable) {
|
} catch (e: HumanQrLoginException.SlidingSyncNotAvailable) {
|
||||||
Timber.e(e, "Failed to create client with simplified sliding sync, trying with Proxy now")
|
Timber.e(e, "Failed to create client with simplified sliding sync, trying with Proxy now")
|
||||||
@@ -304,7 +303,7 @@ class RustMatrixAuthenticationService @Inject constructor(
|
|||||||
passphrase = pendingPassphrase,
|
passphrase = pendingPassphrase,
|
||||||
slidingSyncType = getSlidingSyncProxy(),
|
slidingSyncType = getSlidingSyncProxy(),
|
||||||
)
|
)
|
||||||
.run { config() }
|
.config()
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
@@ -206,6 +206,7 @@ class RustSessionVerificationService(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun updateVerificationStatus() {
|
private suspend fun updateVerificationStatus() {
|
||||||
if (verificationFlowState.value == VerificationFlowState.Finished) {
|
if (verificationFlowState.value == VerificationFlowState.Finished) {
|
||||||
// Calling `encryptionService.verificationState()` performs a network call and it will deadlock if there is no network
|
// Calling `encryptionService.verificationState()` performs a network call and it will deadlock if there is no network
|
||||||
|
|||||||
Reference in New Issue
Block a user