mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
adding unavailable homeserver error messaging in the registration page
This commit is contained in:
parent
d71d37c1ce
commit
c6bae6812d
@ -48,6 +48,7 @@ import im.vector.app.features.onboarding.OnboardingViewEvents
|
||||
import im.vector.app.features.onboarding.OnboardingViewState
|
||||
import kotlinx.coroutines.flow.launchIn
|
||||
import org.matrix.android.sdk.api.auth.data.SsoIdentityProvider
|
||||
import org.matrix.android.sdk.api.failure.isHomeserverUnavailable
|
||||
import org.matrix.android.sdk.api.failure.isInvalidPassword
|
||||
import org.matrix.android.sdk.api.failure.isInvalidUsername
|
||||
import org.matrix.android.sdk.api.failure.isLoginEmailUnknown
|
||||
@ -133,6 +134,9 @@ class FtueAuthCombinedRegisterFragment @Inject constructor() : AbstractSSOFtueAu
|
||||
throwable.isWeakPassword() || throwable.isInvalidPassword() -> {
|
||||
views.createAccountPasswordInput.error = errorFormatter.toHumanReadable(throwable)
|
||||
}
|
||||
throwable.isHomeserverUnavailable() -> {
|
||||
views.createAccountInput.error = getString(R.string.login_error_homeserver_not_found)
|
||||
}
|
||||
throwable.isRegistrationDisabled() -> {
|
||||
MaterialAlertDialogBuilder(requireActivity())
|
||||
.setTitle(R.string.dialog_title_error)
|
||||
|
Loading…
Reference in New Issue
Block a user