MESSENGER-5570 acl status events up to collapsability

This commit is contained in:
Frank Rotermund
2024-02-21 16:50:20 +01:00
parent f9f3b69763
commit 4aaf86e41e
9 changed files with 90 additions and 10 deletions
@@ -125,8 +125,12 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
case MXEventTypeRoomAvatar:
case MXEventTypeRoomJoinRules:
{
self.tag = RoomBubbleCellDataTagRoomCreateConfiguration;
if (event.prevContent == nil) {
self.tag = RoomBubbleCellDataTagRoomCreateConfiguration;
} else {
self.tag = RoomBubbleCellDataTagRoomConfiguration;
}
// Membership events can be collapsed together
self.collapsable = YES;
@@ -134,6 +138,15 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
self.collapsed = YES;
}
break;
case MXEventTypeRoomServerACL:
{
self.tag = RoomBubbleCellDataTagACL;
// ACL events can be collapsed together
self.collapsable = YES;
self.collapsed = YES;
}
break;
case MXEventTypeCallInvite:
case MXEventTypeCallAnswer:
case MXEventTypeCallHangup:
@@ -439,8 +452,14 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
return NO;
}
else if (self.tag == RoomBubbleCellDataTagRoomCreateConfiguration && cellData.tag == RoomBubbleCellDataTagRoomCreateConfiguration)
else if (self.tag == RoomBubbleCellDataTagRoomCreateConfiguration && (cellData.tag == RoomBubbleCellDataTagACL || cellData.tag == RoomBubbleCellDataTagRoomCreateConfiguration))
{
return YES;
}
else if (self.tag == RoomBubbleCellDataTagRoomConfiguration && cellData.tag == RoomBubbleCellDataTagRoomConfiguration)
{
return YES;
}
else if (self.tag == RoomBubbleCellDataTagCall && cellData.tag == RoomBubbleCellDataTagCall)
@@ -454,6 +473,9 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
return [eventContent1.callId isEqualToString:eventContent2.callId];
}
else if (self.tag == RoomBubbleCellDataTagACL && (cellData.tag == RoomBubbleCellDataTagACL || cellData.tag == RoomBubbleCellDataTagRoomCreateConfiguration)) {
return YES;
}
if (self.tag == RoomBubbleCellDataTagRoomCreateWithPredecessor || cellData.tag == RoomBubbleCellDataTagRoomCreateWithPredecessor)
{