From fe4c4832bd47ca471fd4d037e5f9834b9ea2b736 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 2 Jul 2021 18:38:57 +0100 Subject: [PATCH] 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. --- .../choose/VerificationChooseMethodController.kt | 14 ++++++++++++-- vector/src/main/res/values/strings.xml | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/crypto/verification/choose/VerificationChooseMethodController.kt b/vector/src/main/java/im/vector/app/features/crypto/verification/choose/VerificationChooseMethodController.kt index 1202a22042..c3908ea90e 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/verification/choose/VerificationChooseMethodController.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/verification/choose/VerificationChooseMethodController.kt @@ -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)) diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index 6908fe5d79..7f827e17bc 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -2630,7 +2630,9 @@ You Scan the code with the other user\'s device to securely verify each other + Scan the code with your other device to securely verify each other Scan their code + Scan with this device Can\'t scan If you\'re not in person, compare emoji instead