diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewItem.m b/Signal/src/ViewControllers/ConversationView/ConversationViewItem.m index b5f4c3863..7a2c75cfd 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewItem.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewItem.m @@ -561,6 +561,18 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType) return; } + // Check for quoted replies _before_ media album handling, + // since that logic may exit early. + if (message.quotedMessage) { + self.quotedReply = + [OWSQuotedReplyModel quotedReplyWithQuotedMessage:message.quotedMessage transaction:transaction]; + + if (self.quotedReply.body.length > 0) { + self.displayableQuotedText = + [self displayableQuotedTextForText:self.quotedReply.body interactionId:message.uniqueId]; + } + } + NSArray *attachments = [message attachmentsWithTransaction:transaction]; if ([message isMediaAlbumWithTransaction:transaction]) { OWSAssertDebug(attachments.count > 0); @@ -642,16 +654,6 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType) self.messageCellType = OWSMessageCellType_TextMessage; self.displayableBodyText = [[DisplayableText alloc] initWithFullText:@"" displayText:@"" isTextTruncated:NO]; } - - if (message.quotedMessage) { - self.quotedReply = - [OWSQuotedReplyModel quotedReplyWithQuotedMessage:message.quotedMessage transaction:transaction]; - - if (self.quotedReply.body.length > 0) { - self.displayableQuotedText = - [self displayableQuotedTextForText:self.quotedReply.body interactionId:message.uniqueId]; - } - } } - (NSArray *)mediaAlbumItemsForAttachments:(NSArray *)attachments