From 1854373dd64908ec830643d6dd11f1047a5f9605 Mon Sep 17 00:00:00 2001 From: James Graham Date: Sat, 3 Feb 2024 16:44:12 +0000 Subject: [PATCH] - Low priority rooms only show highlights and mentions in the `roomlist` - Muted rooms hide their bubble in the `roomlist` - Mentions and keywords only show highlights --- src/qml/RoomDelegate.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qml/RoomDelegate.qml b/src/qml/RoomDelegate.qml index 1acead9f3..d9ce88f89 100644 --- a/src/qml/RoomDelegate.qml +++ b/src/qml/RoomDelegate.qml @@ -29,7 +29,7 @@ Delegates.RoundedItemDelegate { required property string displayName - readonly property bool hasNotifications: notificationCount > 0 + readonly property bool hasNotifications: currentRoom.pushNotificationState === PushNotificationState.MentionKeyword || currentRoom.isLowPriority ? highlightCount > 0 : notificationCount > 0 signal selected() @@ -105,7 +105,7 @@ Delegates.RoundedItemDelegate { enabled: false implicitWidth: Kirigami.Units.iconSizes.smallMedium implicitHeight: Kirigami.Units.iconSizes.smallMedium - visible: currentRoom.pushNotificationState === PushNotificationState.Mute && !configButton.visible && !hasNotifications + visible: currentRoom.pushNotificationState === PushNotificationState.Mute && !configButton.visible Accessible.name: i18n("Muted room") Layout.rightMargin: Kirigami.Units.smallSpacing } @@ -113,13 +113,13 @@ Delegates.RoundedItemDelegate { QQC2.Label { id: notificationCountLabel - text: root.notificationCount - visible: root.hasNotifications + text: currentRoom.pushNotificationState === PushNotificationState.MentionKeyword || currentRoom.isLowPriority ? root.highlightCount : root.notificationCount + visible: root.hasNotifications && currentRoom.pushNotificationState !== PushNotificationState.Mute color: Kirigami.Theme.textColor horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter background: Rectangle { - visible: notificationCount > 0 + visible: root.hasNotifications Kirigami.Theme.colorSet: Kirigami.Theme.Button color: highlightCount > 0 ? Kirigami.Theme.positiveTextColor : Kirigami.Theme.disabledTextColor opacity: highlightCount > 0 ? 1 : 0.3