Show notification counts on the room Avatars when collapsed.

Show notification counts on the room Avatars when collapsed.

BUG: 468520
This commit is contained in:
James Graham
2024-08-06 20:51:16 +00:00
parent e0c8945431
commit 68dfc6ca81
5 changed files with 121 additions and 84 deletions

View File

@@ -54,13 +54,17 @@ Delegates.RoundedItemDelegate {
contentItem: RowLayout {
spacing: Kirigami.Units.largeSpacing
Components.Avatar {
AvatarNotification {
source: root.avatar ? root.connection.makeMediaUrl("mxc://" + root.avatar) : ""
name: root.displayName
visible: NeoChatConfig.showAvatarInRoomDrawer
implicitHeight: Kirigami.Units.gridUnit + (NeoChatConfig.compactRoomList ? 0 : Kirigami.Units.largeSpacing * 2)
implicitWidth: visible ? implicitHeight : 0
notificationCount: root.contextNotificationCount
notificationHighlight: root.hasHighlightNotifications
showNotificationLabel: root.hasNotifications && root.collapsed
Layout.fillHeight: true
Layout.preferredWidth: height
}