pr suggestions

This commit is contained in:
Mauro Romito
2025-03-20 19:33:17 +01:00
committed by Mauro
parent 9e0e5bbb13
commit 8e439bc8f5
11 changed files with 31 additions and 25 deletions
@@ -13,6 +13,15 @@ enum RoomAvatar: Equatable {
case room(id: String, name: String?, avatarURL: URL?)
/// An avatar generated from the room's heroes.
case heroes([UserProfileProxy])
var removingAvatar: RoomAvatar {
switch self {
case let .room(id, name, _):
return .room(id: id, name: name, avatarURL: nil)
case let .heroes(users):
return .heroes(users.map { .init(userID: $0.userID, displayName: $0.displayName, avatarURL: nil) })
}
}
}
/// A view that shows the avatar for a room, or a cluster of heroes if provided.