mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 16:13:42 +02:00
[RoomBubbleCellData] Add room create with predecessor tag in order to identify this particular case
This commit is contained in:
@@ -44,6 +44,11 @@ static NSAttributedString *readReceiptVerticalWhitespace = nil;
|
||||
// Collapse them by default
|
||||
self.collapsed = YES;
|
||||
}
|
||||
|
||||
if (event.eventType == MXEventTypeRoomCreate && roomState.hasRoomPredecessor)
|
||||
{
|
||||
self.tag = RoomBubbleCellDataTagRoomCreateWithPredecessor;
|
||||
}
|
||||
|
||||
// Increase maximum number of components
|
||||
self.maxComponentCount = 20;
|
||||
@@ -130,6 +135,11 @@ static NSAttributedString *readReceiptVerticalWhitespace = nil;
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (self.tag == RoomBubbleCellDataTagRoomCreateWithPredecessor || cellData.tag == RoomBubbleCellDataTagRoomCreateWithPredecessor)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
return [super collapseWith:cellData];
|
||||
}
|
||||
|
||||
@@ -483,6 +493,12 @@ static NSAttributedString *readReceiptVerticalWhitespace = nil;
|
||||
// We do not want to merge membership event cells with other cell types
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (self.tag == RoomBubbleCellDataTagRoomCreateWithPredecessor || bubbleCellData.tag == RoomBubbleCellDataTagRoomCreateWithPredecessor)
|
||||
{
|
||||
// We do not want to merge room create event cells with other cell types
|
||||
return NO;
|
||||
}
|
||||
|
||||
return [super hasSameSenderAsBubbleCellData:bubbleCellData];
|
||||
}
|
||||
@@ -494,6 +510,12 @@ static NSAttributedString *readReceiptVerticalWhitespace = nil;
|
||||
// One single bubble per membership event
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (self.tag == RoomBubbleCellDataTagRoomCreateWithPredecessor || event.eventType == MXEventTypeRoomCreate)
|
||||
{
|
||||
// We do not want to merge room create event cells with other cell types
|
||||
return NO;
|
||||
}
|
||||
|
||||
// Update read receipts for this bubble
|
||||
self.readReceipts[event.eventId] = [roomDataSource.room getEventReceipts:event.eventId sorted:YES];
|
||||
|
||||
Reference in New Issue
Block a user