mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Add support for Space avatars. (#4362)
This commit is contained in:
@@ -69,6 +69,10 @@ extension BaseRoomInfoProxyProtocol {
|
||||
return .tombstoned
|
||||
}
|
||||
|
||||
if isSpace {
|
||||
return .space(id: id, name: displayName, avatarURL: avatarURL)
|
||||
}
|
||||
|
||||
if isDirect, avatarURL == nil, heroes.count == 1 {
|
||||
return .heroes(heroes.map(UserProfileProxy.init))
|
||||
}
|
||||
|
||||
@@ -134,6 +134,11 @@ extension RoomSummary {
|
||||
return .tombstoned
|
||||
}
|
||||
|
||||
// NOTE: The check for isSpace isn't implemented yet, waiting to see
|
||||
// whether we end up with a different type for spaces in the room list.
|
||||
//
|
||||
// Don't forget to add a test when you remove this comment 😄
|
||||
|
||||
if isDirect, avatarURL == nil, heroes.count == 1 {
|
||||
return .heroes(heroes)
|
||||
} else {
|
||||
|
||||
@@ -570,7 +570,8 @@ class TimelineController: TimelineControllerProtocol {
|
||||
attachments: nil)
|
||||
|
||||
let avatarURL: URL? = switch roomProxy.details.avatar {
|
||||
case .room(_, _, let avatarURL):
|
||||
case .room(_, _, let avatarURL),
|
||||
.space(_, _, let avatarURL):
|
||||
avatarURL
|
||||
case .heroes(let userProfiles):
|
||||
userProfiles.first?.avatarURL
|
||||
|
||||
Reference in New Issue
Block a user