From 7d7b6689c451ddb6b77cd9ef93235baa17606a88 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Fri, 9 Jun 2017 17:16:27 -0400 Subject: [PATCH] Tweak verification state messages. // FREEBIE --- Signal/src/views/OWSSystemMessageCell.m | 9 +++++++++ Signal/translations/en.lproj/Localizable.strings | 8 ++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Signal/src/views/OWSSystemMessageCell.m b/Signal/src/views/OWSSystemMessageCell.m index fef054035..1d66ee4be 100644 --- a/Signal/src/views/OWSSystemMessageCell.m +++ b/Signal/src/views/OWSSystemMessageCell.m @@ -141,6 +141,15 @@ NS_ASSUME_NONNULL_BEGIN break; case TSInfoMessageVerificationStateChange: result = [UIImage imageNamed:@"system_message_verified"]; + + OWSAssert([interaction isKindOfClass:[OWSVerificationStateChangeMessage class]]); + if ([interaction isKindOfClass:[OWSVerificationStateChangeMessage class]]) { + OWSVerificationStateChangeMessage *message = (OWSVerificationStateChangeMessage *)interaction; + BOOL isVerified = message.verificationState == OWSVerificationStateVerified; + if (!isVerified) { + result = [UIImage imageNamed:@"system_message_info"]; + } + } break; } } else if ([interaction isKindOfClass:[TSCall class]]) { diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index 1261d3cb0..7b33cf752 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -1430,16 +1430,16 @@ "VERIFICATION_PHONE_NUMBER_FORMAT" = "Enter the verification code we sent to %@."; /* Format for info message indicating that the verification state was unverified on this device. Embeds {{user's name or phone number}}. */ -"VERIFICATION_STATE_CHANGE_FORMAT_NOT_VERIFIED_LOCAL" = "You unverified %@."; +"VERIFICATION_STATE_CHANGE_FORMAT_NOT_VERIFIED_LOCAL" = "You marked %@ as not verified."; /* Format for info message indicating that the verification state was unverified on another device. Embeds {{user's name or phone number}}. */ -"VERIFICATION_STATE_CHANGE_FORMAT_NOT_VERIFIED_OTHER_DEVICE" = "You unverified %@ on another device."; +"VERIFICATION_STATE_CHANGE_FORMAT_NOT_VERIFIED_OTHER_DEVICE" = "You marked %@ as not verified on another device."; /* Format for info message indicating that the verification state was verified on this device. Embeds {{user's name or phone number}}. */ -"VERIFICATION_STATE_CHANGE_FORMAT_VERIFIED_LOCAL" = "You verified %@."; +"VERIFICATION_STATE_CHANGE_FORMAT_VERIFIED_LOCAL" = "You marked %@ as verified."; /* Format for info message indicating that the verification state was verified on another device. Embeds {{user's name or phone number}}. */ -"VERIFICATION_STATE_CHANGE_FORMAT_VERIFIED_OTHER_DEVICE" = "You verified %@ on another device."; +"VERIFICATION_STATE_CHANGE_FORMAT_VERIFIED_OTHER_DEVICE" = "You marked %@ as verified on another device."; /* Generic message indicating that verification state changed for a given user. */ "VERIFICATION_STATE_CHANGE_GENERIC" = "Verification state changed.";