Revert "Label quoted replies to yourself as such."

This reverts commit 24d7492f61.
pull/1/head
Matthew Chen 7 years ago
parent 24d7492f61
commit f6698501df

@ -301,20 +301,13 @@ NS_ASSUME_NONNULL_BEGIN
- (UILabel *)createQuotedAuthorLabel - (UILabel *)createQuotedAuthorLabel
{ {
NSString *_Nullable localNumber = [TSAccountManager localNumber]; OWSContactsManager *contactsManager = Environment.current.contactsManager;
NSString *quotedAuthorText; NSString *quotedAuthor = [contactsManager displayNameForPhoneIdentifier:self.quotedMessage.authorId];
if ([localNumber isEqualToString:self.quotedMessage.authorId]) { NSString *quotedAuthorText =
quotedAuthorText = NSLocalizedString( [NSString stringWithFormat:
@"QUOTED_REPLY_AUTHOR_INDICATOR_YOURSELF", @"Indicates the author of a quoted message is yourself."); NSLocalizedString(@"QUOTED_REPLY_AUTHOR_INDICATOR_FORMAT",
} else { @"Indicates the author of a quoted message. Embeds {{the author's name or phone number}}."),
OWSContactsManager *contactsManager = Environment.current.contactsManager; quotedAuthor];
NSString *quotedAuthor = [contactsManager displayNameForPhoneIdentifier:self.quotedMessage.authorId];
quotedAuthorText = [NSString
stringWithFormat:
NSLocalizedString(@"QUOTED_REPLY_AUTHOR_INDICATOR_FORMAT",
@"Indicates the author of a quoted message. Embeds {{the author's name or phone number}}."),
quotedAuthor];
}
UILabel *quotedAuthorLabel = [UILabel new]; UILabel *quotedAuthorLabel = [UILabel new];
quotedAuthorLabel.text = quotedAuthorText; quotedAuthorLabel.text = quotedAuthorText;

@ -1411,9 +1411,6 @@
/* Indicates the author of a quoted message. Embeds {{the author's name or phone number}}. */ /* Indicates the author of a quoted message. Embeds {{the author's name or phone number}}. */
"QUOTED_REPLY_AUTHOR_INDICATOR_FORMAT" = "Replying to %@"; "QUOTED_REPLY_AUTHOR_INDICATOR_FORMAT" = "Replying to %@";
/* Indicates the author of a quoted message is yourself. */
"QUOTED_REPLY_AUTHOR_INDICATOR_YOURSELF" = "Yourself";
/* Indicates this message is a quoted reply to an attachment of unknown type. */ /* Indicates this message is a quoted reply to an attachment of unknown type. */
"QUOTED_REPLY_TYPE_ATTACHMENT" = "Attachment"; "QUOTED_REPLY_TYPE_ATTACHMENT" = "Attachment";

@ -154,7 +154,7 @@
// The search will always converge since in the worst case (namely // The search will always converge since in the worst case (namely
// a single character which in utf-8 is >= 1024 bytes) the loop will // a single character which in utf-8 is >= 1024 bytes) the loop will
// exit when the string is empty. // exit when the string is empty.
truncatedText = [truncatedText substringToIndex:truncatedText.length / 2]; truncatedText = [truncatedText substringToIndex:oversizeText.length / 2];
} }
if ([truncatedText dataUsingEncoding:NSUTF8StringEncoding].length < kOversizeTextMessageSizeThreshold) { if ([truncatedText dataUsingEncoding:NSUTF8StringEncoding].length < kOversizeTextMessageSizeThreshold) {
quotedText = truncatedText; quotedText = truncatedText;

Loading…
Cancel
Save