add view avatar a11y label

This commit is contained in:
Mauro Romito
2025-06-26 11:45:34 +02:00
committed by Mauro
parent bfd97cd560
commit e075c90bee
4 changed files with 28 additions and 2 deletions
@@ -26,6 +26,17 @@ enum RoomAvatar: Equatable {
.tombstoned
}
}
var hasURL: Bool {
switch self {
case let .room(_, _, url):
return url != nil
case let .heroes(heroes):
return heroes.first?.avatarURL != nil
case .tombstoned:
return false
}
}
}
/// A view that shows the avatar for a room, or a cluster of heroes if provided.