mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Use the room heroes when computing a DM avatar. (#2900)
* Use room heroes for DM avatar content ID. * Use RoomAvatar.heroes for the DM Details stack.
This commit is contained in:
+1
-1
@@ -110,7 +110,7 @@ struct NotificationSettingsEditScreenRoom: Identifiable, Equatable {
|
||||
|
||||
var name = ""
|
||||
|
||||
var avatarURL: URL?
|
||||
var avatar: RoomAvatar
|
||||
|
||||
var notificationMode: RoomNotificationModeProxy?
|
||||
}
|
||||
|
||||
+1
-1
@@ -168,7 +168,7 @@ class NotificationSettingsEditScreenViewModel: NotificationSettingsEditScreenVie
|
||||
return NotificationSettingsEditScreenRoom(id: details.id,
|
||||
roomId: details.id,
|
||||
name: details.name,
|
||||
avatarURL: details.avatarURL,
|
||||
avatar: details.avatar,
|
||||
notificationMode: notificationMode)
|
||||
}
|
||||
|
||||
|
||||
+5
-6
@@ -39,11 +39,9 @@ struct NotificationSettingsEditScreenRoomCell: View {
|
||||
@ViewBuilder @MainActor
|
||||
var avatar: some View {
|
||||
if dynamicTypeSize < .accessibility3 {
|
||||
LoadableAvatarImage(url: room.avatarURL,
|
||||
name: room.name,
|
||||
contentID: room.roomId,
|
||||
avatarSize: .room(on: .notificationSettings),
|
||||
imageProvider: context.imageProvider)
|
||||
RoomAvatarImage(avatar: room.avatar,
|
||||
avatarSize: .room(on: .notificationSettings),
|
||||
imageProvider: context.imageProvider)
|
||||
.dynamicTypeSize(dynamicTypeSize < .accessibility1 ? dynamicTypeSize : .accessibility1)
|
||||
.accessibilityHidden(true)
|
||||
}
|
||||
@@ -76,7 +74,8 @@ struct NotificationSettingsEditScreenRoomCell_Previews: PreviewProvider, Testabl
|
||||
case .filled(let details):
|
||||
return NotificationSettingsEditScreenRoom(id: UUID().uuidString,
|
||||
roomId: details.id,
|
||||
name: details.name)
|
||||
name: details.name,
|
||||
avatar: details.avatar)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user