Merge pull request #6274 from vector-im/ismail/5502_ungroup_threads

Ungroup events containing thread roots
This commit is contained in:
ismailgulek
2022-06-14 11:18:23 +03:00
committed by GitHub
5 changed files with 33 additions and 21 deletions
@@ -989,11 +989,22 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
return NO;
}
if (self.hasThreadRoot || bubbleCellData.hasThreadRoot)
{
// We do not want to merge events containing thread roots
return NO;
}
return [super hasSameSenderAsBubbleCellData:bubbleCellData];
}
- (BOOL)addEvent:(MXEvent*)event andRoomState:(MXRoomState*)roomState
{
if (self.hasThreadRoot)
{
// We don't want to add any events into this bubble data if it's a thread root
return NO;
}
RoomTimelineConfiguration *timelineConfiguration = [RoomTimelineConfiguration shared];
if (NO == [timelineConfiguration.currentStyle canAddEvent:event and:roomState to:self]) {