From f27b64edef94978c21ca31ab3d15018dd15c895b Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Sat, 26 Nov 2022 13:55:45 +0000 Subject: [PATCH] Add a status icon for muted room on RoomListPage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ![图片](/uploads/3ae8ca85875765a75f0c4f19a60c7af2/图片.png) This could be helpful for some working use-case: When user want to mute a channel temporary and want to un-mute it later, the icon could help user know the mute status at a glance so they won't forget to un-mute the channel. This icon will only be shown if the channel is muted, and have no unread message and the item is not hovered, so it won't get in the way when user have unread messages. --- src/qml/Page/RoomListPage.qml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/qml/Page/RoomListPage.qml b/src/qml/Page/RoomListPage.qml index e75c38fe3..2b20405b5 100644 --- a/src/qml/Page/RoomListPage.qml +++ b/src/qml/Page/RoomListPage.qml @@ -332,6 +332,15 @@ Kirigami.ScrollablePage { } trailing: RowLayout { + Kirigami.Icon { + source: "notifications-disabled" + enabled: false + implicitWidth: Kirigami.Units.iconSizes.smallMedium + implicitHeight: Kirigami.Units.iconSizes.smallMedium + Layout.rightMargin: Kirigami.Units.smallSpacing + visible: currentRoom.pushNotificationState === PushNotificationState.Mute && !configButton.visible && unreadCount <= 0 + Accessible.name: i18n("Muted room") + } QQC2.Label { text: notificationCount > 0 ? notificationCount : "●" visible: unreadCount > 0