From 9110fe8a6ace4cf7e6d32adfc0b8bcc9f2c952b5 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Thu, 12 May 2022 11:49:46 +0100 Subject: [PATCH] lifting unavailable homeserver rendering to the activity/ftuevariant - the viewmodel is now responsible for inferring connectivity errors and providing a retry action --- .../vector/app/features/onboarding/ftueauth/FtueExtensions.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueExtensions.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueExtensions.kt index 8d63fbf547..5228e289bc 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueExtensions.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueExtensions.kt @@ -17,13 +17,17 @@ package im.vector.app.features.onboarding.ftueauth import android.widget.Button +import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.textfield.TextInputLayout +import im.vector.app.R import im.vector.app.core.extensions.hasContentFlow +import im.vector.app.core.extensions.inferNoConnectivity import im.vector.app.features.login.SignMode import im.vector.app.features.onboarding.OnboardingAction import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.onEach +import org.matrix.android.sdk.api.failure.isHomeserverUnavailable fun SignMode.toAuthenticateAction(login: String, password: String, initialDeviceName: String): OnboardingAction.AuthenticateAction { return when (this) {