Rename UserProfileProxy to UserProfile. It's a pure struct and proxies nothing.

Also remove the redundant `userID` property given `id` already exists (for Identifiable conformance).
This commit is contained in:
Doug
2026-07-01 15:18:03 +01:00
committed by Doug
parent bdf53b64a8
commit 3ef66cdd05
55 changed files with 203 additions and 209 deletions
@@ -13,7 +13,7 @@ enum RoomAvatar: Equatable {
/// An avatar generated from a Room's details.
case room(id: String, name: String?, avatarURL: URL?)
/// An avatar generated from a collection of room heroes.
case heroes([UserProfileProxy])
case heroes([UserProfile])
/// An avatar generated from a Space's details.
case space(id: String, name: String?, avatarURL: URL?)
/// A static avatar for a tombstoned room.
@@ -24,7 +24,7 @@ enum RoomAvatar: Equatable {
case let .room(id, name, _):
.room(id: id, name: name, avatarURL: nil)
case let .heroes(users):
.heroes(users.map { .init(userID: $0.userID, displayName: $0.displayName, avatarURL: nil) })
.heroes(users.map { .init(userID: $0.id, displayName: $0.displayName, avatarURL: nil) })
case .space(let id, let name, _):
.space(id: id, name: name, avatarURL: nil)
case .tombstoned:
@@ -76,7 +76,7 @@ struct RoomAvatarImage: View {
ZStack {
LoadableAvatarImage(url: users[0].avatarURL,
name: users[0].displayName,
contentID: users[0].userID,
contentID: users[0].id,
avatarSize: avatarSize,
mediaProvider: mediaProvider,
onTap: onAvatarTap)
@@ -84,7 +84,7 @@ struct RoomAvatarImage: View {
LoadableAvatarImage(url: users[1].avatarURL,
name: users[1].displayName,
contentID: users[1].userID,
contentID: users[1].id,
avatarSize: avatarSize,
mediaProvider: mediaProvider,
onTap: onAvatarTap)
@@ -107,7 +107,7 @@ struct RoomAvatarImage: View {
} else {
LoadableAvatarImage(url: users[0].avatarURL,
name: users[0].displayName,
contentID: users[0].userID,
contentID: users[0].id,
avatarSize: avatarSize,
mediaProvider: mediaProvider,
onTap: onAvatarTap)