Load and store URLPreviewViewData in RoomBubbleCellData.

Implement close button and store the action in Core Data. Hide the preview image view when no image is received. Remove line breaks in description text.
This commit is contained in:
Doug
2021-09-01 10:37:37 +01:00
parent 2abc19b599
commit cd87095453
28 changed files with 716 additions and 376 deletions
@@ -29,4 +29,17 @@
self.messageTextView.tintColor = ThemeService.shared.theme.tintColor;
}
+ (CGFloat)heightForCellData:(MXKCellData *)cellData withMaximumWidth:(CGFloat)maxWidth
{
RoomBubbleCellData *bubbleData = (RoomBubbleCellData*)cellData;
if (bubbleData && bubbleData.urlPreviewData)
{
CGFloat height = [super heightForCellData:cellData withMaximumWidth:maxWidth];
return height + RoomBubbleCellLayout.urlPreviewViewTopMargin + [URLPreviewView contentViewHeightFor:bubbleData.urlPreviewData];
}
return [super heightForCellData:cellData withMaximumWidth:maxWidth];
}
@end