Simplify space notification options
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 {
|