Use different title for scan button for self verification

Because it's not 'their' device, it's your own device.
This commit is contained in:
David Baker
2021-07-02 17:38:12 +01:00
parent 3b6feb3583
commit 5dbd7f1f5a
3 changed files with 11 additions and 1 deletions
@@ -143,7 +143,9 @@ final class KeyVerificationVerifyByScanningViewController: UIViewController {
self.titleLabel.text = VectorL10n.keyVerificationVerifyQrCodeTitle
self.informationLabel.text = VectorL10n.keyVerificationVerifyQrCodeInformation
self.scanCodeButton.setTitle(VectorL10n.keyVerificationVerifyQrCodeScanCodeAction, for: .normal)
// Hide until we have the type of the verification request
self.scanCodeButton.isHidden = true
self.cannotScanButton.setTitle(VectorL10n.keyVerificationVerifyQrCodeCannotScanAction, for: .normal)
}
@@ -195,10 +197,13 @@ final class KeyVerificationVerifyByScanningViewController: UIViewController {
switch viewData.verificationKind {
case .user:
informationText = VectorL10n.keyVerificationVerifyQrCodeInformation
self.scanCodeButton.setTitle(VectorL10n.keyVerificationVerifyQrCodeScanCodeAction, for: .normal)
default:
informationText = VectorL10n.keyVerificationVerifyQrCodeInformationOtherDevice
self.scanCodeButton.setTitle(VectorL10n.keyVerificationVerifyQrCodeScanCodeOtherDeviceAction, for: .normal)
}
self.scanCodeButton.isHidden = false
self.informationLabel.text = informationText
}
}