mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
Rename profile as userAvatarAndName
This commit is contained in:
committed by
aringenbach
parent
fb95e6fd78
commit
cfeae5bc64
@@ -58,8 +58,11 @@
|
||||
targetId = [event.type isEqualToString:kMXEventTypeStringRoomMember] ? event.stateKey : nil;
|
||||
roomId = roomDataSource.roomId;
|
||||
|
||||
MXRoomState *profileRoomState = RiotSettings.shared.roomScreenUseOnlyLatestProfiles ? roomDataSource.roomState : roomState;
|
||||
[self setRoomState:profileRoomState];
|
||||
// If `roomScreenUseOnlyLatestUserAvatarAndName`is enabled, the avatar and name are
|
||||
// displayed from the latest room state perspective rather than the historical.
|
||||
MXRoomState *latestRoomState = roomDataSource.roomState;
|
||||
MXRoomState *displayRoomState = RiotSettings.shared.roomScreenUseOnlyLatestUserAvatarAndName ? latestRoomState : roomState;
|
||||
[self setRoomState:displayRoomState];
|
||||
senderAvatarPlaceholder = nil;
|
||||
targetAvatarPlaceholder = nil;
|
||||
|
||||
|
||||
@@ -48,9 +48,12 @@ static NSAttributedString *messageSeparator = nil;
|
||||
}
|
||||
|
||||
// Check sender information
|
||||
MXRoomState *profileRoomState = RiotSettings.shared.roomScreenUseOnlyLatestProfiles ? roomDataSource.roomState : roomState;
|
||||
NSString *eventSenderName = [roomDataSource.eventFormatter senderDisplayNameForEvent:event withRoomState:profileRoomState];
|
||||
NSString *eventSenderAvatar = [roomDataSource.eventFormatter senderAvatarUrlForEvent:event withRoomState:profileRoomState];
|
||||
// If `roomScreenUseOnlyLatestUserAvatarAndName`is enabled, the avatar and name are
|
||||
// displayed from the latest room state perspective rather than the historical.
|
||||
MXRoomState *latestRoomState = roomDataSource.roomState;
|
||||
MXRoomState *displayRoomState = RiotSettings.shared.roomScreenUseOnlyLatestUserAvatarAndName ? latestRoomState : roomState;
|
||||
NSString *eventSenderName = [roomDataSource.eventFormatter senderDisplayNameForEvent:event withRoomState:displayRoomState];
|
||||
NSString *eventSenderAvatar = [roomDataSource.eventFormatter senderAvatarUrlForEvent:event withRoomState:displayRoomState];
|
||||
if ((self.senderDisplayName || eventSenderName) &&
|
||||
([self.senderDisplayName isEqualToString:eventSenderName] == NO))
|
||||
{
|
||||
|
||||
@@ -4332,11 +4332,11 @@ typedef NS_ENUM (NSUInteger, MXKRoomDataSourceError) {
|
||||
|
||||
/**
|
||||
Refreshes the avatars and display names if needed. This has no effect
|
||||
if `roomScreenUseOnlyLatestProfiles` is disabled.
|
||||
if `roomScreenUseOnlyLatestUserAvatarAndName` is disabled.
|
||||
*/
|
||||
- (void)refreshProfilesIfNeeded
|
||||
{
|
||||
if (RiotSettings.shared.roomScreenUseOnlyLatestProfiles)
|
||||
if (RiotSettings.shared.roomScreenUseOnlyLatestUserAvatarAndName)
|
||||
{
|
||||
@synchronized (bubbles) {
|
||||
for (id<MXKRoomBubbleCellDataStoring> bubble in bubbles)
|
||||
|
||||
Reference in New Issue
Block a user