Update for PR feedback.

URLPreviewManager becomes URLPreviewService.
addVerticalWhitespaceToString used instead of heightForCellData multiple times.
All newline characters removed.
This commit is contained in:
Doug
2021-09-08 15:10:13 +01:00
parent 0f88e8e851
commit 1963f35d30
13 changed files with 105 additions and 150 deletions
@@ -29,18 +29,4 @@
self.messageTextView.tintColor = ThemeService.shared.theme.tintColor;
}
+ (CGFloat)heightForCellData:(MXKCellData *)cellData withMaximumWidth:(CGFloat)maxWidth
{
RoomBubbleCellData *bubbleData = (RoomBubbleCellData*)cellData;
// Include the URL preview in the height if necessary.
if (RiotSettings.shared.roomScreenShowsURLPreviews && bubbleData && bubbleData.showURLPreview)
{
CGFloat height = [super heightForCellData:cellData withMaximumWidth:maxWidth];
return height + RoomBubbleCellLayout.urlPreviewViewTopMargin + [URLPreviewView contentViewHeightFor:bubbleData.urlPreviewData];
}
return [super heightForCellData:cellData withMaximumWidth:maxWidth];
}
@end