From 548a243d6469e64f7df8f4bd382a8a46a2da81f9 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Fri, 15 Jul 2022 10:50:08 +0100 Subject: [PATCH] updating phone number entry to include the homeserver and reduced confirmation copy --- .../onboarding/ftueauth/FtueAuthPhoneEntryFragment.kt | 7 +++++++ vector/src/main/res/layout/fragment_ftue_phone_input.xml | 1 - vector/src/main/res/values/donottranslate.xml | 5 +++-- 3 files changed, 10 insertions(+), 3 deletions(-) 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 905af75639..049c7979c7 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 @@ -27,8 +27,10 @@ import im.vector.app.core.extensions.autofillPhoneNumber import im.vector.app.core.extensions.content import im.vector.app.core.extensions.editText import im.vector.app.core.extensions.setOnImeDoneListener +import im.vector.app.core.extensions.toReducedUrl import im.vector.app.databinding.FragmentFtuePhoneInputBinding import im.vector.app.features.onboarding.OnboardingAction +import im.vector.app.features.onboarding.OnboardingViewState import im.vector.app.features.onboarding.RegisterAction import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach @@ -77,6 +79,11 @@ class FtueAuthPhoneEntryFragment @Inject constructor( } } + override fun updateWithState(state: OnboardingViewState) { + views.phoneEntryHeaderSubtitle.text = getString(R.string.ftue_auth_phone_subtitle, state.selectedHomeserver.userFacingUrl.toReducedUrl()) + + } + override fun onError(throwable: Throwable) { views.phoneEntryInput.error = errorFormatter.toHumanReadable(throwable) } diff --git a/vector/src/main/res/layout/fragment_ftue_phone_input.xml b/vector/src/main/res/layout/fragment_ftue_phone_input.xml index 32b54bcef3..1b97f46dfd 100644 --- a/vector/src/main/res/layout/fragment_ftue_phone_input.xml +++ b/vector/src/main/res/layout/fragment_ftue_phone_input.xml @@ -70,7 +70,6 @@ android:layout_height="wrap_content" android:layout_marginTop="8dp" android:gravity="center" - android:text="@string/ftue_auth_phone_subtitle" android:textColor="?vctr_content_secondary" app:layout_constraintBottom_toTopOf="@id/titleContentSpacing" app:layout_constraintEnd_toEndOf="@id/phoneEntryGutterEnd" diff --git a/vector/src/main/res/values/donottranslate.xml b/vector/src/main/res/values/donottranslate.xml index 8e8e4e8b56..40bce90237 100755 --- a/vector/src/main/res/values/donottranslate.xml +++ b/vector/src/main/res/values/donottranslate.xml @@ -36,7 +36,8 @@ %s needs to verify your account Email Enter your phone number - This will help verify your account and enables password recovery. + + %s needs to verify your account Phone Number Confirmation code @@ -50,7 +51,7 @@ Confirm your phone number - We just sent a code to %s. Enter it below to verify it\'s you. + A code was sent to %s Resend code Check your email to verify.