mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 09:02:44 +02:00
Room summary: fix "No timestamp on last bubble" (vector-im/riot-ios#1129 - 2)
By simplifying the way how the last message cell is computed
This commit is contained in:
@@ -97,22 +97,17 @@
|
||||
|
||||
if (count)
|
||||
{
|
||||
// Look for the cell data which contains the last message.
|
||||
|
||||
// Reset first the flag in each cell data
|
||||
// Enable the containsLastMessage flag for the cell data which contains the last message.
|
||||
@synchronized(bubbles)
|
||||
{
|
||||
// Reset first all cell data
|
||||
for (RoomBubbleCellData *cellData in bubbles)
|
||||
{
|
||||
cellData.containsLastMessage = NO;
|
||||
}
|
||||
}
|
||||
|
||||
// Set the flag in the right cell data
|
||||
NSString *lastMessageEventID = self.room.summary.lastMessageEventId;
|
||||
if (lastMessageEventID)
|
||||
{
|
||||
RoomBubbleCellData *cellData = [self cellDataOfEventWithEventId:lastMessageEventID];
|
||||
|
||||
// The cell containing the last message is the last one
|
||||
RoomBubbleCellData *cellData = bubbles.lastObject;
|
||||
cellData.containsLastMessage = YES;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user