Add a status icon for muted room on RoomListPage

![图片](/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.
This commit is contained in:
Gary Wang
2022-11-26 13:55:45 +00:00
committed by Tobias Fella
parent 1f0e8dd87d
commit f27b64edef

View File

@@ -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