Override hasLink in RoomBubbleCellData to only check the last component.

This commit is contained in:
Doug
2021-09-13 17:47:52 +01:00
parent 83b8148ab5
commit c9e522dfd7
@@ -254,6 +254,14 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
return attributedTextMessage;
}
- (BOOL)hasLink
{
// Only check the last bubble component as -addEvent:andRoomState: will break up
// the data that way, to always show a URL preview at the bottom of the cell.
MXKRoomBubbleComponent *lastComponent = bubbleComponents.lastObject;
return (lastComponent && lastComponent.link);
}
- (BOOL)hasNoDisplay
{
if (self.tag == RoomBubbleCellDataTagKeyVerificationNoDisplay)