Clean up ahead of PR.

pull/1/head
Matthew Chen 7 years ago
parent c648812cf7
commit ca4757b8d1

@ -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

@ -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) {

@ -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;
}
}

Loading…
Cancel
Save