diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageCell.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageCell.m index 08745bb37..fb116ea95 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageCell.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageCell.m @@ -1107,14 +1107,15 @@ NS_ASSUME_NONNULL_BEGIN OWSMessageTextView *bodyTextView = [self configureBodyTextView]; CGSize textSize = CGSizeCeil([bodyTextView sizeThatFits:CGSizeMake(maxTextWidth, CGFLOAT_MAX)]); - CGSize textViewSize = textSize; + textSize.width = MIN(textSize.width, maxTextWidth); + CGSize result = textSize; if (includeMargins) { - textViewSize.width += leftMargin + rightMargin; - textViewSize.height += self.textTopMargin + self.textBottomMargin; + result.width += leftMargin + rightMargin; + result.height += self.textTopMargin + self.textBottomMargin; } - return CGSizeCeil(textViewSize); + return CGSizeCeil(result); } - (CGSize)bodyMediaSizeForContentWidth:(int)contentWidth diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSQuotedMessageView.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSQuotedMessageView.m index 492efd787..2ad53ff37 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSQuotedMessageView.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSQuotedMessageView.m @@ -75,7 +75,7 @@ NS_ASSUME_NONNULL_BEGIN && ![OWSMimeTypeOversizeTextMessage isEqualToString:self.quotedMessage.contentType]); } -- (BOOL)hasQuotedAttachmentThumbnail +- (BOOL)hasQuotedAttachmentThumbnailImage { return (self.quotedMessage.contentType.length > 0 && ![OWSMimeTypeOversizeTextMessage isEqualToString:self.quotedMessage.contentType] && @@ -206,7 +206,7 @@ NS_ASSUME_NONNULL_BEGIN - (nullable UIImage *)tryToLoadThumbnailImage { - if (!self.hasQuotedAttachmentThumbnail) { + if (!self.hasQuotedAttachmentThumbnailImage) { return nil; } if (!self.quotedMessage.thumbnailData) { diff --git a/SignalServiceKit/src/Messages/Attachments/TSAttachmentStream.m b/SignalServiceKit/src/Messages/Attachments/TSAttachmentStream.m index 51fadbaa4..dc09f7ad7 100644 --- a/SignalServiceKit/src/Messages/Attachments/TSAttachmentStream.m +++ b/SignalServiceKit/src/Messages/Attachments/TSAttachmentStream.m @@ -588,7 +588,7 @@ NS_ASSUME_NONNULL_BEGIN if (!error) { return (CGFloat)[audioPlayer duration]; } else { - OWSFail(@"Could not find audio duration: %@", self.mediaURL); + DDLogError(@"Could not find audio duration: %@", self.mediaURL); return 0; } }