Fix a couple of missing UserStatus values. (#5944)

* Fix the missing UserStatus in RoomMemberProxy.

* Use the hero's status for a room's AvatarHeaderView.
This commit is contained in:
Doug
2026-07-30 10:33:11 +01:00
committed by GitHub
parent 704b3dbb29
commit 33f8ce2759
2 changed files with 4 additions and 2 deletions
@@ -41,14 +41,16 @@ struct AvatarHeaderView<Footer: View>: View {
@ViewBuilder footer: @escaping () -> Footer) {
avatarInfo = .room(room.avatar)
title = room.name ?? room.id
status = nil
if let roomAlias = room.canonicalAlias {
subtitle = roomAlias
status = nil
} else if room.isDirect, case let .heroes(heroes) = room.avatar, heroes.count == 1 {
subtitle = heroes[0].id
status = heroes[0].status
} else {
subtitle = nil
status = nil
}
self.avatarSize = avatarSize
@@ -37,7 +37,7 @@ final nonisolated class RoomMemberProxy: RoomMemberProxyProtocol {
}
var status: UserStatus {
UserStatus()
UserStatus(rustStatus: member.status, rustCall: member.call)
}
var membership: MembershipState {