diff --git a/Riot/Assets/en.lproj/Vector.strings b/Riot/Assets/en.lproj/Vector.strings
index 1cd99d0bc..4bcd91a0b 100644
--- a/Riot/Assets/en.lproj/Vector.strings
+++ b/Riot/Assets/en.lproj/Vector.strings
@@ -1038,7 +1038,7 @@
"key_verification_other_session_title" = "Verify session";
"key_verification_new_session_title" = "Verify your new session";
"key_verification_this_session_title" = "Verify this session";
-"key_verification_user_title" = "verify them";
+"key_verification_user_title" = "Verify them";
"device_verification_security_advice_emoji" = "Compare the unique emoji, ensuring they appear in the same order.";
"device_verification_security_advice_number" = "Compare the numbers, ensuring they appear in the same order.";
"device_verification_cancelled" = "The other party cancelled the verification.";
@@ -1093,14 +1093,16 @@
// Device
"device_verification_verified_title" = "Verified!";
-"device_verification_verified_description_1" = "You've successfully verified this session.";
-"device_verification_verified_description_2" = "Secure messages with this user are end-to-end encrypted and not able to be read by third parties.";
"device_verification_verified_got_it_button" = "Got it";
+"key_verification_verified_new_session_title" = "New session verified!";
+
+"key_verification_verified_other_session_information" = "You can now read secure messages on your other session, and other users will know they can trust it.";
+"key_verification_verified_new_session_information" = "You can now read secure messages on your new device, and other users will know they can trust it.";
+"key_verification_verified_this_session_information" = "You can now read secure messages on this device, and other users will know they can trust it.";
// User
-"key_verification_verified_user_description_1" = "You’ve successfully verified this user.";
-"key_verification_verified_user_description_2" = "Messages with this user in this room are end-to-end encrypted and can’t be read by third parties.";
+"key_verification_verified_user_information" = "Messages with this user are end-to-end encrypted and can't be read by third parties.";
// MARK: Emoji
"device_verification_emoji_dog" = "Dog";
diff --git a/Riot/Generated/Strings.swift b/Riot/Generated/Strings.swift
index 182d1a719..3d634e623 100644
--- a/Riot/Generated/Strings.swift
+++ b/Riot/Generated/Strings.swift
@@ -878,14 +878,6 @@ internal enum VectorL10n {
internal static var deviceVerificationStartWaitPartner: String {
return VectorL10n.tr("Vector", "device_verification_start_wait_partner")
}
- /// You've successfully verified this session.
- internal static var deviceVerificationVerifiedDescription1: String {
- return VectorL10n.tr("Vector", "device_verification_verified_description_1")
- }
- /// Secure messages with this user are end-to-end encrypted and not able to be read by third parties.
- internal static var deviceVerificationVerifiedDescription2: String {
- return VectorL10n.tr("Vector", "device_verification_verified_description_2")
- }
/// Got it
internal static var deviceVerificationVerifiedGotItButton: String {
return VectorL10n.tr("Vector", "device_verification_verified_got_it_button")
@@ -1618,17 +1610,29 @@ internal enum VectorL10n {
internal static var keyVerificationTileRequestStatusWaiting: String {
return VectorL10n.tr("Vector", "key_verification_tile_request_status_waiting")
}
- /// verify them
+ /// Verify them
internal static var keyVerificationUserTitle: String {
return VectorL10n.tr("Vector", "key_verification_user_title")
}
- /// You’ve successfully verified this user.
- internal static var keyVerificationVerifiedUserDescription1: String {
- return VectorL10n.tr("Vector", "key_verification_verified_user_description_1")
+ /// You can now read secure messages on your new device, and other users will know they can trust it.
+ internal static var keyVerificationVerifiedNewSessionInformation: String {
+ return VectorL10n.tr("Vector", "key_verification_verified_new_session_information")
}
- /// Messages with this user in this room are end-to-end encrypted and can’t be read by third parties.
- internal static var keyVerificationVerifiedUserDescription2: String {
- return VectorL10n.tr("Vector", "key_verification_verified_user_description_2")
+ /// New session verified!
+ internal static var keyVerificationVerifiedNewSessionTitle: String {
+ return VectorL10n.tr("Vector", "key_verification_verified_new_session_title")
+ }
+ /// You can now read secure messages on your other session, and other users will know they can trust it.
+ internal static var keyVerificationVerifiedOtherSessionInformation: String {
+ return VectorL10n.tr("Vector", "key_verification_verified_other_session_information")
+ }
+ /// You can now read secure messages on this device, and other users will know they can trust it.
+ internal static var keyVerificationVerifiedThisSessionInformation: String {
+ return VectorL10n.tr("Vector", "key_verification_verified_this_session_information")
+ }
+ /// Messages with this user are end-to-end encrypted and can't be read by third parties.
+ internal static var keyVerificationVerifiedUserInformation: String {
+ return VectorL10n.tr("Vector", "key_verification_verified_user_information")
}
/// Can't scan?
internal static var keyVerificationVerifyQrCodeCannotScanAction: String {
diff --git a/Riot/Modules/KeyVerification/Common/KeyVerificationCoordinator.swift b/Riot/Modules/KeyVerification/Common/KeyVerificationCoordinator.swift
index 97e14928e..cb52c0e4f 100644
--- a/Riot/Modules/KeyVerification/Common/KeyVerificationCoordinator.swift
+++ b/Riot/Modules/KeyVerification/Common/KeyVerificationCoordinator.swift
@@ -116,39 +116,67 @@ final class KeyVerificationCoordinator: KeyVerificationCoordinatorType {
// MARK: - Public methods
+// func start() {
+// let rootCoordinator: Coordinator & Presentable
+//
+// switch self.verificationFlow {
+// case .verifyUser(let roomMember):
+// rootCoordinator = self.createUserVerificationStartCoordinator(with: roomMember)
+// case .verifyDevice(let userId, let deviceId):
+// if userId == self.session.myUser.userId {
+// rootCoordinator = self.createSelfVerificationCoordinator(otherDeviceId: deviceId)
+// } else {
+// rootCoordinator = self.createDataLoadingScreenCoordinator(otherUserId: userId, otherDeviceId: deviceId)
+// }
+// case .incomingRequest(let incomingKeyVerificationRequest):
+// rootCoordinator = self.createDataLoadingScreenCoordinator(with: incomingKeyVerificationRequest)
+// case .incomingSASTransaction(let incomingSASTransaction):
+// rootCoordinator = self.createDataLoadingScreenCoordinator(otherUserId: incomingSASTransaction.otherUserId, otherDeviceId: incomingSASTransaction.otherDeviceId)
+// case .completeSecurity(let isNewSignIn):
+// rootCoordinator = self.createCompleteSecurityCoordinator(isNewSignIn: isNewSignIn)
+// }
+//
+// rootCoordinator.start()
+//
+// self.add(childCoordinator: rootCoordinator)
+//
+// if self.navigationRouter.modules.isEmpty == false {
+// self.navigationRouter.push(rootCoordinator, animated: true, popCompletion: { [weak self] in
+// self?.remove(childCoordinator: rootCoordinator)
+// })
+// } else {
+// self.navigationRouter.setRootModule(rootCoordinator) { [weak self] in
+// self?.remove(childCoordinator: rootCoordinator)
+// }
+// }
+// }
+
func start() {
- let rootCoordinator: Coordinator & Presentable
-
- switch self.verificationFlow {
- case .verifyUser(let roomMember):
- rootCoordinator = self.createUserVerificationStartCoordinator(with: roomMember)
- case .verifyDevice(let userId, let deviceId):
- if userId == self.session.myUser.userId {
- rootCoordinator = self.createSelfVerificationCoordinator(otherDeviceId: deviceId)
- } else {
- rootCoordinator = self.createDataLoadingScreenCoordinator(otherUserId: userId, otherDeviceId: deviceId)
- }
- case .incomingRequest(let incomingKeyVerificationRequest):
- rootCoordinator = self.createDataLoadingScreenCoordinator(with: incomingKeyVerificationRequest)
- case .incomingSASTransaction(let incomingSASTransaction):
- rootCoordinator = self.createDataLoadingScreenCoordinator(otherUserId: incomingSASTransaction.otherUserId, otherDeviceId: incomingSASTransaction.otherDeviceId)
- case .completeSecurity(let isNewSignIn):
- rootCoordinator = self.createCompleteSecurityCoordinator(isNewSignIn: isNewSignIn)
- }
-
- rootCoordinator.start()
-
- self.add(childCoordinator: rootCoordinator)
-
- if self.navigationRouter.modules.isEmpty == false {
- self.navigationRouter.push(rootCoordinator, animated: true, popCompletion: { [weak self] in
- self?.remove(childCoordinator: rootCoordinator)
- })
- } else {
- self.navigationRouter.setRootModule(rootCoordinator) { [weak self] in
- self?.remove(childCoordinator: rootCoordinator)
- }
- }
+// let rootCoordinator: Coordinator & Presentable
+//
+//
+// let coordinator = KeyVerificationScanConfirmationCoordinator(session: self.session, transaction: MXQRCodeTransaction(), codeScanning: .myQRCodeScanned, verificationKind: self.verificationKind)
+// coordinator.delegate = self
+//
+// rootCoordinator = coordinator
+//
+// rootCoordinator.start()
+//
+// self.add(childCoordinator: rootCoordinator)
+//
+// if self.navigationRouter.modules.isEmpty == false {
+// self.navigationRouter.push(rootCoordinator, animated: true, popCompletion: { [weak self] in
+// self?.remove(childCoordinator: rootCoordinator)
+// })
+// } else {
+// self.navigationRouter.setRootModule(rootCoordinator) { [weak self] in
+// self?.remove(childCoordinator: rootCoordinator)
+// }
+// }
+
+ let viewController = KeyVerificationVerifiedViewController.instantiate(with: self.verificationKind)
+ viewController.delegate = self
+ self.navigationRouter.setRootModule(viewController)
}
func toPresentable() -> UIViewController {
diff --git a/Riot/Modules/KeyVerification/Common/Verified/KeyVerificationVerifiedViewController.storyboard b/Riot/Modules/KeyVerification/Common/Verified/KeyVerificationVerifiedViewController.storyboard
index 43b7fe2ee..bc069c0d7 100644
--- a/Riot/Modules/KeyVerification/Common/Verified/KeyVerificationVerifiedViewController.storyboard
+++ b/Riot/Modules/KeyVerification/Common/Verified/KeyVerificationVerifiedViewController.storyboard
@@ -22,10 +22,10 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
-
+
-
-
+
+
+
+
+
@@ -134,16 +110,17 @@
-
-
-
-
+
+
-
+
+
+
+
diff --git a/Riot/Modules/KeyVerification/Common/Verified/KeyVerificationVerifiedViewController.swift b/Riot/Modules/KeyVerification/Common/Verified/KeyVerificationVerifiedViewController.swift
index 7e0975081..ed869052f 100644
--- a/Riot/Modules/KeyVerification/Common/Verified/KeyVerificationVerifiedViewController.swift
+++ b/Riot/Modules/KeyVerification/Common/Verified/KeyVerificationVerifiedViewController.swift
@@ -30,11 +30,8 @@ final class KeyVerificationVerifiedViewController: UIViewController {
// MARK: Outlets
@IBOutlet private weak var titleLabel: UILabel!
- @IBOutlet private weak var description1Label: UILabel!
- @IBOutlet private weak var description2Label: UILabel!
-
- @IBOutlet private weak var okButtonBackgroundView: UIView!
- @IBOutlet private weak var okButton: UIButton!
+ @IBOutlet private weak var informationLabel: UILabel!
+ @IBOutlet private weak var doneButton: RoundedButton!
// MARK: Private
@@ -83,26 +80,28 @@ final class KeyVerificationVerifiedViewController: UIViewController {
private func setupViews() {
let bodyTitle: String
- let descriptionTextPart1: String
- let descriptionTextPart2: String
+ let informationText: String
switch self.verificationKind {
- case .otherSession, .thisSession, .newSession:
+ case .otherSession:
bodyTitle = VectorL10n.deviceVerificationVerifiedTitle
- descriptionTextPart1 = VectorL10n.deviceVerificationVerifiedDescription1
- descriptionTextPart2 = VectorL10n.deviceVerificationVerifiedDescription2
+ informationText = VectorL10n.keyVerificationVerifiedOtherSessionInformation
+ case .newSession:
+ bodyTitle = VectorL10n.keyVerificationVerifiedNewSessionTitle
+ informationText = VectorL10n.keyVerificationVerifiedNewSessionInformation
+ case .thisSession:
+ bodyTitle = VectorL10n.deviceVerificationVerifiedTitle
+ informationText = VectorL10n.keyVerificationVerifiedThisSessionInformation
case .user:
bodyTitle = VectorL10n.deviceVerificationVerifiedTitle
- descriptionTextPart1 = VectorL10n.keyVerificationVerifiedUserDescription1
- descriptionTextPart2 = VectorL10n.keyVerificationVerifiedUserDescription2
+ informationText = VectorL10n.keyVerificationVerifiedUserInformation
}
self.title = self.verificationKind.verificationTitle
self.titleLabel.text = bodyTitle
- self.description1Label.text = descriptionTextPart1
- self.description2Label.text = descriptionTextPart2
+ self.informationLabel.text = informationText
- self.okButton.setTitle(VectorL10n.deviceVerificationVerifiedGotItButton, for: .normal)
+ self.doneButton.setTitle(VectorL10n.deviceVerificationVerifiedGotItButton, for: .normal)
}
private func update(theme: Theme) {
@@ -115,11 +114,8 @@ final class KeyVerificationVerifiedViewController: UIViewController {
}
self.titleLabel.textColor = theme.textPrimaryColor
- self.description1Label.textColor = theme.textPrimaryColor
- self.description2Label.textColor = theme.textPrimaryColor
-
- self.okButtonBackgroundView.backgroundColor = theme.backgroundColor
- theme.applyStyle(onButton: self.okButton)
+ self.informationLabel.textColor = theme.textPrimaryColor
+ self.doneButton.update(theme: theme)
}
private func registerThemeServiceDidChangeThemeNotification() {
@@ -132,7 +128,7 @@ final class KeyVerificationVerifiedViewController: UIViewController {
self.update(theme: ThemeService.shared().theme)
}
- @IBAction private func validateButtonAction(_ sender: Any) {
+ @IBAction private func doneButtonAction(_ sender: Any) {
self.delegate?.keyVerificationVerifiedViewControllerDidTapSetupAction(self)
}
}