mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
DM Design Tweaks (#3693)
* dm design tweaks * adding equatable conformance * topic will now be shown in DMs * code suggestion * updated details * better check * code improvement
This commit is contained in:
@@ -37,7 +37,14 @@ struct AvatarHeaderView<Footer: View>: View {
|
||||
@ViewBuilder footer: @escaping () -> Footer) {
|
||||
avatarInfo = .room(room.avatar)
|
||||
title = room.name ?? room.id
|
||||
subtitle = room.canonicalAlias
|
||||
|
||||
if let roomAlias = room.canonicalAlias {
|
||||
subtitle = roomAlias
|
||||
} else if room.isDirect, case let .heroes(heroes) = room.avatar, heroes.count == 1 {
|
||||
subtitle = heroes[0].userID
|
||||
} else {
|
||||
subtitle = nil
|
||||
}
|
||||
|
||||
self.avatarSize = avatarSize
|
||||
self.mediaProvider = mediaProvider
|
||||
@@ -193,7 +200,8 @@ struct AvatarHeaderView_Previews: PreviewProvider, TestablePreview {
|
||||
avatarURL: .mockMXCAvatar),
|
||||
canonicalAlias: "#test:matrix.org",
|
||||
isEncrypted: true,
|
||||
isPublic: true),
|
||||
isPublic: true,
|
||||
isDirect: false),
|
||||
avatarSize: .room(on: .details),
|
||||
mediaProvider: MediaProviderMock(configuration: .init())) {
|
||||
HStack(spacing: 32) {
|
||||
|
||||
Reference in New Issue
Block a user