Clean up ahead of PR.

pull/1/head
Matthew Chen 7 years ago
parent f6aa3f89b7
commit c5d8a7cb38

@ -255,6 +255,11 @@ NS_ASSUME_NONNULL_BEGIN
text = sourceFilename; text = sourceFilename;
textColor = self.filenameTextColor; textColor = self.filenameTextColor;
font = self.filenameFont; font = self.filenameFont;
} else {
text = NSLocalizedString(
@"QUOTED_REPLY_TYPE_ATTACHMENT", @"Indicates this message is a quoted reply to an attachment of unknown type.");
textColor = self.fileTypeTextColor;
font = self.fileTypeFont;
} }
UILabel *quotedTextLabel = [UILabel new]; UILabel *quotedTextLabel = [UILabel new];
@ -271,14 +276,16 @@ NS_ASSUME_NONNULL_BEGIN
{ {
// TODO: Are we going to use the filename? For all mimetypes? // TODO: Are we going to use the filename? For all mimetypes?
NSString *_Nullable contentType = self.quotedMessage.contentType; NSString *_Nullable contentType = self.quotedMessage.contentType;
if (contentType.length > 0) { if (contentType.length < 1) {
if ([MIMETypeUtil isAudio:contentType]) { return nil;
return NSLocalizedString( }
@"QUOTED_REPLY_TYPE_AUDIO", @"Indicates this message is a quoted reply to an audio file.");
} else if ([MIMETypeUtil isVideo:contentType]) { if ([MIMETypeUtil isAudio:contentType]) {
return NSLocalizedString( return NSLocalizedString(
@"QUOTED_REPLY_TYPE_VIDEO", @"Indicates this message is a quoted reply to a video file."); @"QUOTED_REPLY_TYPE_AUDIO", @"Indicates this message is a quoted reply to an audio file.");
} } else if ([MIMETypeUtil isVideo:contentType]) {
return NSLocalizedString(
@"QUOTED_REPLY_TYPE_VIDEO", @"Indicates this message is a quoted reply to a video file.");
} else if ([MIMETypeUtil isImage:contentType] || [MIMETypeUtil isAnimated:contentType]) { } else if ([MIMETypeUtil isImage:contentType] || [MIMETypeUtil isAnimated:contentType]) {
return NSLocalizedString( return NSLocalizedString(
@"QUOTED_REPLY_TYPE_IMAGE", @"Indicates this message is a quoted reply to an image file."); @"QUOTED_REPLY_TYPE_IMAGE", @"Indicates this message is a quoted reply to an image file.");

@ -1408,6 +1408,9 @@
/* 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 this message is a quoted reply to an attachment of unknown type. */
"QUOTED_REPLY_TYPE_ATTACHMENT" = "Attachment";
/* Indicates this message is a quoted reply to an audio file. */ /* Indicates this message is a quoted reply to an audio file. */
"QUOTED_REPLY_TYPE_AUDIO" = "Audio"; "QUOTED_REPLY_TYPE_AUDIO" = "Audio";

Loading…
Cancel
Save