Use different copy for self verification

The copy all refers to 'their' device for when you're verifying
someone else. Update it to refer to your own devices in the case
where you're verifying one of your own devices.
This commit is contained in:
David Baker 2021-07-02 18:38:57 +01:00
parent 2a0230633d
commit fe4c4832bd
2 changed files with 14 additions and 2 deletions

View file

@ -45,9 +45,19 @@ class VerificationChooseMethodController @Inject constructor(
val host = this
if (state.otherCanScanQrCode || state.otherCanShowQrCode) {
var scanCodeInstructions: String
var scanOtherCodeTitle: String
if (state.isMe) {
scanCodeInstructions = host.stringProvider.getString(R.string.verification_scan_self_notice)
scanOtherCodeTitle = host.stringProvider.getString(R.string.verification_scan_with_this_device)
} else {
scanCodeInstructions = host.stringProvider.getString(R.string.verification_scan_notice)
scanOtherCodeTitle = host.stringProvider.getString(R.string.verification_scan_their_code)
}
bottomSheetVerificationNoticeItem {
id("notice")
notice(host.stringProvider.getString(R.string.verification_scan_notice))
notice(scanCodeInstructions)
}
if (state.otherCanScanQrCode && !state.qrCodeText.isNullOrBlank()) {
@ -64,7 +74,7 @@ class VerificationChooseMethodController @Inject constructor(
if (state.otherCanShowQrCode) {
bottomSheetVerificationActionItem {
id("openCamera")
title(host.stringProvider.getString(R.string.verification_scan_their_code))
title(scanOtherCodeTitle)
titleColor(host.colorProvider.getColorFromAttribute(R.attr.colorPrimary))
iconRes(R.drawable.ic_camera)
iconColor(host.colorProvider.getColorFromAttribute(R.attr.colorPrimary))

View file

@ -2630,7 +2630,9 @@
<string name="you">You</string>
<string name="verification_scan_notice">Scan the code with the other user\'s device to securely verify each other</string>
<string name="verification_scan_self_notice">Scan the code with your other device to securely verify each other</string>
<string name="verification_scan_their_code">Scan their code</string>
<string name="verification_scan_with_this_device">Scan with this device</string>
<string name="verification_scan_emoji_title">Can\'t scan</string>
<string name="verification_scan_emoji_subtitle">If you\'re not in person, compare emoji instead</string>