mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 10:25:35 +03:00
lifting unavailable homeserver rendering to the activity/ftuevariant
- the viewmodel is now responsible for inferring connectivity errors and providing a retry action
This commit is contained in:
parent
e6beb73e3d
commit
9110fe8a6a
1 changed files with 4 additions and 0 deletions
|
@ -17,13 +17,17 @@
|
||||||
package im.vector.app.features.onboarding.ftueauth
|
package im.vector.app.features.onboarding.ftueauth
|
||||||
|
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
import com.google.android.material.textfield.TextInputLayout
|
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.hasContentFlow
|
||||||
|
import im.vector.app.core.extensions.inferNoConnectivity
|
||||||
import im.vector.app.features.login.SignMode
|
import im.vector.app.features.login.SignMode
|
||||||
import im.vector.app.features.onboarding.OnboardingAction
|
import im.vector.app.features.onboarding.OnboardingAction
|
||||||
import kotlinx.coroutines.flow.Flow
|
import kotlinx.coroutines.flow.Flow
|
||||||
import kotlinx.coroutines.flow.combine
|
import kotlinx.coroutines.flow.combine
|
||||||
import kotlinx.coroutines.flow.onEach
|
import kotlinx.coroutines.flow.onEach
|
||||||
|
import org.matrix.android.sdk.api.failure.isHomeserverUnavailable
|
||||||
|
|
||||||
fun SignMode.toAuthenticateAction(login: String, password: String, initialDeviceName: String): OnboardingAction.AuthenticateAction {
|
fun SignMode.toAuthenticateAction(login: String, password: String, initialDeviceName: String): OnboardingAction.AuthenticateAction {
|
||||||
return when (this) {
|
return when (this) {
|
||||||
|
|
Loading…
Reference in a new issue