mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 16:13:42 +02:00
Revamp refreshProfiles as setRoomState
This commit is contained in:
committed by
aringenbach
parent
4eafe7fd9a
commit
1f59ed74e7
@@ -59,12 +59,12 @@
|
||||
roomId = roomDataSource.roomId;
|
||||
|
||||
MXRoomState *profileRoomState = RiotSettings.shared.roomScreenUseOnlyLatestProfiles ? roomDataSource.roomState : roomState;
|
||||
senderDisplayName = [roomDataSource.eventFormatter senderDisplayNameForEvent:event withRoomState:profileRoomState];
|
||||
senderAvatarUrl = [roomDataSource.eventFormatter senderAvatarUrlForEvent:event withRoomState:profileRoomState];
|
||||
[self setRoomState:profileRoomState];
|
||||
senderAvatarPlaceholder = nil;
|
||||
targetDisplayName = [roomDataSource.eventFormatter targetDisplayNameForEvent:event withRoomState:profileRoomState];
|
||||
targetAvatarUrl = [roomDataSource.eventFormatter targetAvatarUrlForEvent:event withRoomState:profileRoomState];
|
||||
targetAvatarPlaceholder = nil;
|
||||
|
||||
// Encryption status should always rely on the `MXRoomState`
|
||||
// from the event rather than the latest.
|
||||
isEncryptedRoom = roomState.isEncrypted;
|
||||
isIncoming = ([event.sender isEqualToString:roomDataSource.mxSession.myUser.userId] == NO);
|
||||
|
||||
@@ -107,9 +107,8 @@
|
||||
bubbleComponents = nil;
|
||||
}
|
||||
|
||||
- (void)refreshProfile
|
||||
- (void)setRoomState:(MXRoomState *)roomState;
|
||||
{
|
||||
MXRoomState *roomState = roomDataSource.roomState;
|
||||
MXEvent* firstEvent = self.events.firstObject;
|
||||
|
||||
if (firstEvent == nil || roomState == nil)
|
||||
|
||||
Reference in New Issue
Block a user