From ec6beae3410ecf336868b39b1f733fc5e8f7717c Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Thu, 9 Jun 2022 17:42:42 +0100 Subject: [PATCH] formatting --- .../ftueauth/FtueAuthGenericTextInputFormFragment.kt | 2 +- .../onboarding/ftueauth/FtueAuthPhoneEntryFragment.kt | 4 ++-- .../features/onboarding/ftueauth/FtueAuthVariant.kt | 10 +++++----- .../features/onboarding/ftueauth/PhoneNumberParser.kt | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthGenericTextInputFormFragment.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthGenericTextInputFormFragment.kt index 806eb6cce8b..edfbcd89b66 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthGenericTextInputFormFragment.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthGenericTextInputFormFragment.kt @@ -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 -> { diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthPhoneEntryFragment.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthPhoneEntryFragment.kt index 70c56bacb84..905af756393 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthPhoneEntryFragment.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthPhoneEntryFragment.kt @@ -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)))) } diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthVariant.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthVariant.kt index f00026b903a..1febd516fe3 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthVariant.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthVariant.kt @@ -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 } } @@ -386,7 +386,7 @@ class FtueAuthVariant( vectorFeatures.isOnboardingCombinedRegisterEnabled() -> addRegistrationStageFragmentToBackstack( FtueAuthPhoneEntryFragment::class.java ) - else -> addRegistrationStageFragmentToBackstack( + else -> addRegistrationStageFragmentToBackstack( FtueAuthGenericTextInputFormFragment::class.java, FtueAuthGenericTextInputFormFragmentArgument(TextInputFormFragmentMode.SetMsisdn, stage.mandatory), ) diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/PhoneNumberParser.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/PhoneNumberParser.kt index eb108d3c478..6a46a466eb4 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/PhoneNumberParser.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/PhoneNumberParser.kt @@ -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) } }