mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Merge the 2 map.
This commit is contained in:
+3
-4
@@ -85,12 +85,11 @@ class ConfirmAccountProviderPresenter @AssistedInject constructor(
|
|||||||
suspend {
|
suspend {
|
||||||
val domain = tryOrNull { URL(homeserverUrl) }?.host ?: homeserverUrl
|
val domain = tryOrNull { URL(homeserverUrl) }?.host ?: homeserverUrl
|
||||||
authenticationService.setHomeserver(domain).map {
|
authenticationService.setHomeserver(domain).map {
|
||||||
authenticationService.getHomeserverDetails().value!!
|
val matrixHomeServerDetails = authenticationService.getHomeserverDetails().value!!
|
||||||
}.map {
|
if (matrixHomeServerDetails.supportsOidcLogin) {
|
||||||
if (it.supportsOidcLogin) {
|
|
||||||
// Retrieve the details right now
|
// Retrieve the details right now
|
||||||
LoginFlow.OidcFlow(authenticationService.getOidcUrl().getOrThrow())
|
LoginFlow.OidcFlow(authenticationService.getOidcUrl().getOrThrow())
|
||||||
} else if (it.supportsPasswordLogin) {
|
} else if (matrixHomeServerDetails.supportsPasswordLogin) {
|
||||||
LoginFlow.PasswordLogin
|
LoginFlow.PasswordLogin
|
||||||
} else {
|
} else {
|
||||||
throw IllegalStateException("Unsupported login flow")
|
throw IllegalStateException("Unsupported login flow")
|
||||||
|
|||||||
Reference in New Issue
Block a user