mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 16:13:42 +02:00
Include URL previews in addVerticalWhitespaceToString:forEvent: and remove heightForCellData:withMaximumWidth: from the various TextMsgBubbleCell subclasses.
Use the bubble cell data's available width when sizing URL previews and update the defaultAvailableWidth and reducedWidthThreshold accordingly.
This commit is contained in:
@@ -29,19 +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
|
||||
fitting:maxWidth];
|
||||
}
|
||||
|
||||
return [super heightForCellData:cellData withMaximumWidth:maxWidth];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user