diff options
author | Loren Burkholder <computersemiexpert@outlook.com> | 2022-06-06 12:07:25 -0400 |
---|---|---|
committer | Loren Burkholder <computersemiexpert@outlook.com> | 2022-06-29 22:04:37 -0400 |
commit | 885a790b1fa16524058a5c8aacf3ec8e9641709d (patch) | |
tree | 4e032e0c31d2bfb023eee73a130b52d4da2ecf45 /resources | |
parent | make license (diff) | |
download | nheko-885a790b1fa16524058a5c8aacf3ec8e9641709d.tar.xz |
Simplify space notification options
Diffstat (limited to 'resources')
-rw-r--r-- | resources/qml/CommunitiesList.qml | 36 | ||||
-rw-r--r-- | resources/qml/RoomList.qml | 4 |
2 files changed, 4 insertions, 36 deletions
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 { |