Skip to content

Commit 548a243

Browse files
committed
updating phone number entry to include the homeserver and reduced confirmation copy
1 parent 3140867 commit 548a243

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthPhoneEntryFragment.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ import im.vector.app.core.extensions.autofillPhoneNumber
2727
import im.vector.app.core.extensions.content
2828
import im.vector.app.core.extensions.editText
2929
import im.vector.app.core.extensions.setOnImeDoneListener
30+
import im.vector.app.core.extensions.toReducedUrl
3031
import im.vector.app.databinding.FragmentFtuePhoneInputBinding
3132
import im.vector.app.features.onboarding.OnboardingAction
33+
import im.vector.app.features.onboarding.OnboardingViewState
3234
import im.vector.app.features.onboarding.RegisterAction
3335
import kotlinx.coroutines.flow.launchIn
3436
import kotlinx.coroutines.flow.onEach
@@ -77,6 +79,11 @@ class FtueAuthPhoneEntryFragment @Inject constructor(
7779
}
7880
}
7981

82+
override fun updateWithState(state: OnboardingViewState) {
83+
views.phoneEntryHeaderSubtitle.text = getString(R.string.ftue_auth_phone_subtitle, state.selectedHomeserver.userFacingUrl.toReducedUrl())
84+
85+
}
86+
8087
override fun onError(throwable: Throwable) {
8188
views.phoneEntryInput.error = errorFormatter.toHumanReadable(throwable)
8289
}

vector/src/main/res/layout/fragment_ftue_phone_input.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
android:layout_height="wrap_content"
7171
android:layout_marginTop="8dp"
7272
android:gravity="center"
73-
android:text="@string/ftue_auth_phone_subtitle"
7473
android:textColor="?vctr_content_secondary"
7574
app:layout_constraintBottom_toTopOf="@id/titleContentSpacing"
7675
app:layout_constraintEnd_toEndOf="@id/phoneEntryGutterEnd"

vector/src/main/res/values/donottranslate.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
<string name="ftue_auth_email_subtitle">%s needs to verify your account</string>
3737
<string name="ftue_auth_email_entry_title">Email</string>
3838
<string name="ftue_auth_phone_title">Enter your phone number</string>
39-
<string name="ftue_auth_phone_subtitle">This will help verify your account and enables password recovery.</string>
39+
<!-- Note for translators, %s is the homeserver name, eg matrix.org -->
40+
<string name="ftue_auth_phone_subtitle">%s needs to verify your account</string>
4041
<string name="ftue_auth_phone_entry_title">Phone Number</string>
4142
<string name="ftue_auth_phone_confirmation_entry_title">Confirmation code</string>
4243

@@ -50,7 +51,7 @@
5051

5152
<string name="ftue_auth_phone_confirmation_title">Confirm your phone number</string>
5253
<!-- Note for translators, %s is the users international phone number -->
53-
<string name="ftue_auth_phone_confirmation_subtitle">We just sent a code to %s. Enter it below to verify it\'s you.</string>
54+
<string name="ftue_auth_phone_confirmation_subtitle">A code was sent to %s</string>
5455
<string name="ftue_auth_phone_confirmation_resend_code">Resend code</string>
5556

5657
<string name="ftue_auth_email_verification_title">Check your email to verify.</string>

0 commit comments

Comments
 (0)