Avoid merging of bubbles if current timeline configuration does not allow

This commit is contained in:
ismailgulek
2022-06-13 17:56:01 +03:00
parent e540adfa14
commit 70dfb74fc1
@@ -326,6 +326,16 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
return super.hasThreadRoot;
}
- (BOOL)mergeWithBubbleCellData:(id<MXKRoomBubbleCellDataStoring>)bubbleCellData
{
RoomTimelineConfiguration *timelineConfiguration = [RoomTimelineConfiguration shared];
if (NO == [timelineConfiguration.currentStyle canMergeWithCellData:bubbleCellData into:self]) {
return NO;
}
return [super mergeWithBubbleCellData:bubbleCellData];
}
#pragma mark - Bubble collapsing
- (BOOL)collapseWith:(id<MXKRoomBubbleCellDataStoring>)cellData