Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ouchadam committed Jun 9, 2022
1 parent 666bf0e commit ec6beae
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,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
}
}

Expand All @@ -386,7 +386,7 @@ class FtueAuthVariant(
vectorFeatures.isOnboardingCombinedRegisterEnabled() -> addRegistrationStageFragmentToBackstack(
FtueAuthPhoneEntryFragment::class.java
)
else -> addRegistrationStageFragmentToBackstack(
else -> addRegistrationStageFragmentToBackstack(
FtueAuthGenericTextInputFormFragment::class.java,
FtueAuthGenericTextInputFormFragmentArgument(TextInputFormFragmentMode.SetMsisdn, stage.mandatory),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit ec6beae

Please sign in to comment.