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:
@@ -1021,13 +1021,13 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
|
||||
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
|
||||
if (event.eventType == MXEventTypeRoomMember && event.isUserProfileChange)
|
||||
{
|
||||
[self refreshProfilesIfNeeded];
|
||||
}
|
||||
|
||||
if (MXTimelineDirectionForwards == direction)
|
||||
{
|
||||
if (event.eventType == MXEventTypeRoomMember && event.isUserProfileChange)
|
||||
{
|
||||
[self refreshProfilesIfNeeded];
|
||||
}
|
||||
|
||||
// Check for local echo suppression
|
||||
MXEvent *localEcho;
|
||||
if (self.room.outgoingMessages.count && [event.sender isEqualToString:self.mxSession.myUser.userId])
|
||||
@@ -3668,7 +3668,10 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
|
||||
while ((nextBubbleData = nextBubbleData.nextCollapsableCellData));
|
||||
|
||||
// Build the summary string for the series
|
||||
bubbleData.collapsedAttributedTextMessage = [self.eventFormatter attributedStringFromEvents:events withRoomState:bubbleData.collapseState error:nil];
|
||||
bubbleData.collapsedAttributedTextMessage = [self.eventFormatter attributedStringFromEvents:events
|
||||
withRoomState:bubbleData.collapseState
|
||||
andLatestRoomState:self.roomState
|
||||
error:nil];
|
||||
|
||||
// Release collapseState objects, even the one of collapsableSeriesAtStart.
|
||||
// We do not need to keep its state because if an collapsable event comes before collapsableSeriesAtStart,
|
||||
@@ -4359,18 +4362,14 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
|
||||
#pragma mark - Use Only Latest Profiles
|
||||
|
||||
/**
|
||||
Refreshes the avatars and display names if needed. This has no effect
|
||||
if `roomScreenUseOnlyLatestUserAvatarAndName` is disabled.
|
||||
Refreshes the avatars and display names if needed.
|
||||
*/
|
||||
- (void)refreshProfilesIfNeeded
|
||||
{
|
||||
if (RiotSettings.shared.roomScreenUseOnlyLatestUserAvatarAndName)
|
||||
{
|
||||
@synchronized (bubbles) {
|
||||
for (id<MXKRoomBubbleCellDataStoring> bubble in bubbles)
|
||||
{
|
||||
[bubble setRoomState:self.roomState];
|
||||
}
|
||||
@synchronized (bubbles) {
|
||||
for (id<MXKRoomBubbleCellDataStoring> bubble in bubbles)
|
||||
{
|
||||
[bubble refreshProfilesIfNeeded:self.roomState];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user