Improve global notification settings

Separate the setting for globally setting push rules on/off from the configuration to decide whether desktop popup notifications are sent.

The current master setting is pulling double duty and should probably be separate as some people may want to see notification counts in Neochat but don't want to see popup notifications on their desktop.
This commit is contained in:
James Graham
2023-01-14 12:29:08 +00:00
parent dee3c279e8
commit 5955c8e7dc
4 changed files with 10 additions and 18 deletions

View File

@@ -19,14 +19,12 @@ Kirigami.ScrollablePage {
MobileForm.FormCard {
Layout.fillWidth: true
contentItem: MobileForm.FormCheckDelegate {
text: i18n("Enable notifications for this account")
checked: Config.showNotifications
enabled: !Config.isShowNotificationsImmutable && Controller.activeConnection
description: i18n("Whether push notifications are generated by your Matrix server")
checked: NotificationsManager.globalNotificationsEnabled
enabled: NotificationsManager.globalNotificationsSet
onToggled: {
Config.showNotifications = checked
Config.save()
NotificationsManager.globalNotificationsEnabled = checked
}
}