Merge pull request #3624 from vector-im/dbkr/scan_button_title
Use different copy for self verification
This commit is contained in:
commit
a335c5eb4b
|
@ -0,0 +1 @@
|
||||||
|
Use different copy for self verification.
|
|
@ -45,9 +45,22 @@ class VerificationChooseMethodController @Inject constructor(
|
||||||
val host = this
|
val host = this
|
||||||
|
|
||||||
if (state.otherCanScanQrCode || state.otherCanShowQrCode) {
|
if (state.otherCanScanQrCode || state.otherCanShowQrCode) {
|
||||||
|
var scanCodeInstructions: String
|
||||||
|
var scanOtherCodeTitle: String
|
||||||
|
var compareEmojiSubtitle: 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)
|
||||||
|
compareEmojiSubtitle = host.stringProvider.getString(R.string.verification_scan_self_emoji_subtitle)
|
||||||
|
} else {
|
||||||
|
scanCodeInstructions = host.stringProvider.getString(R.string.verification_scan_notice)
|
||||||
|
scanOtherCodeTitle = host.stringProvider.getString(R.string.verification_scan_their_code)
|
||||||
|
compareEmojiSubtitle = host.stringProvider.getString(R.string.verification_scan_emoji_subtitle)
|
||||||
|
}
|
||||||
|
|
||||||
bottomSheetVerificationNoticeItem {
|
bottomSheetVerificationNoticeItem {
|
||||||
id("notice")
|
id("notice")
|
||||||
notice(host.stringProvider.getString(R.string.verification_scan_notice))
|
notice(scanCodeInstructions)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.otherCanScanQrCode && !state.qrCodeText.isNullOrBlank()) {
|
if (state.otherCanScanQrCode && !state.qrCodeText.isNullOrBlank()) {
|
||||||
|
@ -64,7 +77,7 @@ class VerificationChooseMethodController @Inject constructor(
|
||||||
if (state.otherCanShowQrCode) {
|
if (state.otherCanShowQrCode) {
|
||||||
bottomSheetVerificationActionItem {
|
bottomSheetVerificationActionItem {
|
||||||
id("openCamera")
|
id("openCamera")
|
||||||
title(host.stringProvider.getString(R.string.verification_scan_their_code))
|
title(scanOtherCodeTitle)
|
||||||
titleColor(host.colorProvider.getColorFromAttribute(R.attr.colorPrimary))
|
titleColor(host.colorProvider.getColorFromAttribute(R.attr.colorPrimary))
|
||||||
iconRes(R.drawable.ic_camera)
|
iconRes(R.drawable.ic_camera)
|
||||||
iconColor(host.colorProvider.getColorFromAttribute(R.attr.colorPrimary))
|
iconColor(host.colorProvider.getColorFromAttribute(R.attr.colorPrimary))
|
||||||
|
@ -80,7 +93,7 @@ class VerificationChooseMethodController @Inject constructor(
|
||||||
id("openEmoji")
|
id("openEmoji")
|
||||||
title(host.stringProvider.getString(R.string.verification_scan_emoji_title))
|
title(host.stringProvider.getString(R.string.verification_scan_emoji_title))
|
||||||
titleColor(host.colorProvider.getColorFromAttribute(R.attr.vctr_content_primary))
|
titleColor(host.colorProvider.getColorFromAttribute(R.attr.vctr_content_primary))
|
||||||
subTitle(host.stringProvider.getString(R.string.verification_scan_emoji_subtitle))
|
subTitle(compareEmojiSubtitle)
|
||||||
iconRes(R.drawable.ic_arrow_right)
|
iconRes(R.drawable.ic_arrow_right)
|
||||||
iconColor(host.colorProvider.getColorFromAttribute(R.attr.vctr_content_primary))
|
iconColor(host.colorProvider.getColorFromAttribute(R.attr.vctr_content_primary))
|
||||||
listener { host.listener?.doVerifyBySas() }
|
listener { host.listener?.doVerifyBySas() }
|
||||||
|
|
|
@ -2630,9 +2630,12 @@
|
||||||
<string name="you">You</string>
|
<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_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 or switch and scan with this device</string>
|
||||||
<string name="verification_scan_their_code">Scan their code</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_title">Can\'t scan</string>
|
||||||
<string name="verification_scan_emoji_subtitle">If you\'re not in person, compare emoji instead</string>
|
<string name="verification_scan_emoji_subtitle">If you\'re not in person, compare emoji instead</string>
|
||||||
|
<string name="verification_scan_self_emoji_subtitle">Verify by comparing emoji instead</string>
|
||||||
|
|
||||||
<string name="verification_no_scan_emoji_title">Verify by comparing emojis</string>
|
<string name="verification_no_scan_emoji_title">Verify by comparing emojis</string>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue