mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Do Not Disturb: factorized logic and toast in its proper service.
This commit is contained in:
@@ -48,13 +48,7 @@ NPanel {
|
||||
icon: Settings.data.notifications.doNotDisturb ? "notifications_off" : "notifications_active"
|
||||
tooltipText: Settings.data.notifications.doNotDisturb ? "Do Not Disturb (ON)" : "Do Not Disturb (OFF)"
|
||||
sizeRatio: 0.8
|
||||
onClicked: {
|
||||
Settings.data.notifications.doNotDisturb = !Settings.data.notifications.doNotDisturb
|
||||
ToastService.showNotice(
|
||||
Settings.data.notifications.doNotDisturb ? "Do Not Disturb enabled" : "Do Not Disturb disabled",
|
||||
Settings.data.notifications.doNotDisturb ? "Notifications will be hidden but saved to history" : "Notifications will be shown normally",
|
||||
"notice", false, 2000)
|
||||
}
|
||||
onClicked: Settings.data.notifications.doNotDisturb = !Settings.data.notifications.doNotDisturb
|
||||
}
|
||||
|
||||
NIconButton {
|
||||
|
||||
Reference in New Issue
Block a user