From 885a790b1fa16524058a5c8aacf3ec8e9641709d Mon Sep 17 00:00:00 2001 From: Loren Burkholder Date: Mon, 6 Jun 2022 12:07:25 -0400 Subject: Simplify space notification options --- resources/qml/CommunitiesList.qml | 36 ++---------------------------------- resources/qml/RoomList.qml | 4 ++-- 2 files changed, 4 insertions(+), 36 deletions(-) (limited to 'resources') diff --git a/resources/qml/CommunitiesList.qml b/resources/qml/CommunitiesList.qml index 5bc20dbe..ec9ef940 100644 --- a/resources/qml/CommunitiesList.qml +++ b/resources/qml/CommunitiesList.qml @@ -185,23 +185,7 @@ Page { bubbleBackgroundColor: communityItem.bubbleBackground bubbleTextColor: communityItem.bubbleText font.pixelSize: fontMetrics.font.pixelSize * 0.6 - mayBeVisible: { - if (!communitySidebar.collapsed) - return false - else if (communityItem.muted) - return false - else if (Settings.spaceNotifications === Settings.SpaceNotificationsOff) - return false - else if (Settings.spaceNotifications === Settings.SidebarHiddenRooms) - { - if (communityItem.hidden) - return true - else - return false - } - else - return true - } + mayBeVisible: communitySidebar.collapsed && !communityItem.muted && Settings.spaceNotifications anchors.right: avatar.right anchors.bottom: avatar.bottom anchors.margins: -Nheko.paddingSmall @@ -228,23 +212,7 @@ Page { hasLoudNotification: communityItem.hasLoudNotification bubbleBackgroundColor: communityItem.bubbleBackground bubbleTextColor: communityItem.bubbleText - mayBeVisible: { - if (communitySidebar.collapsed) - return false - else if (communityItem.muted) - return false - else if (Settings.spaceNotification === Settings.SpaceNotificationsOff) - return false - else if (Settings.spaceNotifications === Settings.SidebarHiddenRooms) - { - if (communityItem.hidden) - return true - else - return false - } - else - return true - } + mayBeVisible: !communitySidebar.collapsed && !communityItem.muted && Settings.spaceNotifications Layout.alignment: Qt.AlignRight Layout.leftMargin: Nheko.paddingSmall } diff --git a/resources/qml/RoomList.qml b/resources/qml/RoomList.qml index b34a94a1..ea066876 100644 --- a/resources/qml/RoomList.qml +++ b/resources/qml/RoomList.qml @@ -316,7 +316,7 @@ Page { anchors.right: parent.right anchors.bottom: parent.bottom anchors.margins: -Nheko.paddingSmall - mayBeVisible: collapsed && (isSpace ? Settings.spaceNotifications === Settings.SidebarAndRoomlist : true) + mayBeVisible: collapsed && (isSpace ? Settings.spaceNotifications : true) } } @@ -345,7 +345,7 @@ Page { Layout.leftMargin: Nheko.paddingSmall Layout.preferredWidth: implicitWidth Layout.preferredHeight: implicitHeight - mayBeVisible: !collapsed && (isSpace ? Settings.spaceNotifications === Settings.SidebarAndRoomlist : true) + mayBeVisible: !collapsed && (isSpace ? Settings.spaceNotifications : true) } RowLayout { -- cgit 1.5.1