formatting
This commit is contained in:
parent
f2db4be479
commit
bfa50f186a
|
@ -224,7 +224,7 @@ class FtueAuthGenericTextInputFormFragment @Inject constructor() : AbstractFtueA
|
|||
TextInputFormFragmentMode.SetEmail -> {
|
||||
views.loginGenericTextInputFormTil.error = errorFormatter.toHumanReadable(throwable)
|
||||
}
|
||||
TextInputFormFragmentMode.SetMsisdn -> {
|
||||
TextInputFormFragmentMode.SetMsisdn -> {
|
||||
views.loginGenericTextInputFormTil.error = errorFormatter.toHumanReadable(throwable)
|
||||
}
|
||||
TextInputFormFragmentMode.ConfirmMsisdn -> {
|
||||
|
|
|
@ -68,9 +68,9 @@ class FtueAuthPhoneEntryFragment @Inject constructor(
|
|||
val number = views.phoneEntryInput.content()
|
||||
|
||||
when (val result = phoneNumberParser.parseInternationalNumber(number)) {
|
||||
PhoneNumberParser.Result.ErrorInvalidNumber -> views.phoneEntryInput.error = getString(R.string.login_msisdn_error_other)
|
||||
PhoneNumberParser.Result.ErrorInvalidNumber -> views.phoneEntryInput.error = getString(R.string.login_msisdn_error_other)
|
||||
PhoneNumberParser.Result.ErrorMissingInternationalCode -> views.phoneEntryInput.error = getString(R.string.login_msisdn_error_not_international)
|
||||
is PhoneNumberParser.Result.Success -> {
|
||||
is PhoneNumberParser.Result.Success -> {
|
||||
val (countryCode, phoneNumber) = result
|
||||
viewModel.handle(OnboardingAction.PostRegisterAction(RegisterAction.AddThreePid(RegisterThreePid.Msisdn(phoneNumber, countryCode))))
|
||||
}
|
||||
|
|
|
@ -387,10 +387,10 @@ class FtueAuthVariant(
|
|||
|
||||
when (stage) {
|
||||
is Stage.ReCaptcha -> onCaptcha(stage)
|
||||
is Stage.Email -> onEmail(stage)
|
||||
is Stage.Msisdn -> onMsisdn(stage)
|
||||
is Stage.Terms -> onTerms(stage)
|
||||
else -> Unit // Should not happen
|
||||
is Stage.Email -> onEmail(stage)
|
||||
is Stage.Msisdn -> onMsisdn(stage)
|
||||
is Stage.Terms -> onTerms(stage)
|
||||
else -> Unit // Should not happen
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -399,7 +399,7 @@ class FtueAuthVariant(
|
|||
vectorFeatures.isOnboardingCombinedRegisterEnabled() -> addRegistrationStageFragmentToBackstack(
|
||||
FtueAuthPhoneEntryFragment::class.java
|
||||
)
|
||||
else -> addRegistrationStageFragmentToBackstack(
|
||||
else -> addRegistrationStageFragmentToBackstack(
|
||||
FtueAuthGenericTextInputFormFragment::class.java,
|
||||
FtueAuthGenericTextInputFormFragmentArgument(TextInputFormFragmentMode.SetMsisdn, stage.mandatory),
|
||||
)
|
||||
|
|
|
@ -27,7 +27,7 @@ class PhoneNumberParser @Inject constructor(
|
|||
fun parseInternationalNumber(rawPhoneNumber: String): Result {
|
||||
return when {
|
||||
rawPhoneNumber.doesNotStartWith("+") -> Result.ErrorMissingInternationalCode
|
||||
else -> parseNumber(rawPhoneNumber)
|
||||
else -> parseNumber(rawPhoneNumber)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue