mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 15:52:40 +00:00
Merge pull request #1145 from vector-im/riot-1129-last-message
Room summary: fix "No timestamp on last bubble"
This commit is contained in:
commit
44bbd7a722
1 changed files with 5 additions and 10 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue