mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
Use latest user data for mention pills
This commit is contained in:
@@ -48,7 +48,11 @@
|
||||
self.readReceipts = [NSMutableDictionary dictionary];
|
||||
|
||||
// Create the bubble component based on matrix event
|
||||
MXKRoomBubbleComponent *firstComponent = [[MXKRoomBubbleComponent alloc] initWithEvent:event roomState:roomState eventFormatter:roomDataSource.eventFormatter session:roomDataSource.mxSession];
|
||||
MXKRoomBubbleComponent *firstComponent = [[MXKRoomBubbleComponent alloc] initWithEvent:event
|
||||
roomState:roomState
|
||||
andLatestRoomState:roomDataSource.roomState
|
||||
eventFormatter:roomDataSource.eventFormatter
|
||||
session:roomDataSource.mxSession];
|
||||
if (firstComponent)
|
||||
{
|
||||
bubbleComponents = [NSMutableArray array];
|
||||
@@ -125,6 +129,21 @@
|
||||
bubbleComponents = nil;
|
||||
}
|
||||
|
||||
- (void)refreshProfilesIfNeeded:(MXRoomState *)latestRoomState
|
||||
{
|
||||
if (RiotSettings.shared.roomScreenUseOnlyLatestUserAvatarAndName)
|
||||
{
|
||||
[self setRoomState:latestRoomState];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Sets the `MXRoomState` for a buble cell. This allows to adapt the display
|
||||
of a cell with a different room state than its historical. This won't update critical
|
||||
flag/status, such as `isEncryptedRoom`.
|
||||
|
||||
@param roomState the `MXRoomState` to use for this cell.
|
||||
*/
|
||||
- (void)setRoomState:(MXRoomState *)roomState;
|
||||
{
|
||||
MXEvent* firstEvent = self.events.firstObject;
|
||||
@@ -156,7 +175,10 @@
|
||||
MXKRoomBubbleComponent *roomBubbleComponent = [bubbleComponents objectAtIndex:index];
|
||||
if ([roomBubbleComponent.event.eventId isEqualToString:eventId])
|
||||
{
|
||||
[roomBubbleComponent updateWithEvent:event roomState:roomDataSource.roomState session:self.mxSession];
|
||||
[roomBubbleComponent updateWithEvent:event
|
||||
roomState:roomDataSource.roomState
|
||||
andLatestRoomState:nil
|
||||
session:self.mxSession];
|
||||
if (!roomBubbleComponent.textMessage.length)
|
||||
{
|
||||
[bubbleComponents removeObjectAtIndex:index];
|
||||
|
||||
Reference in New Issue
Block a user