Commit 25f602e4 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Only show do not disturb OSD when it actually changed

In case something (e.g. no notification server) prevented it from activating it
parent e793d643
......@@ -490,7 +490,8 @@ QtObject {
property Notifications.GlobalShortcuts shortcuts: Notifications.GlobalShortcuts {
onToggleDoNotDisturbTriggered: {
if (globals.inhibited) {
var oldInhibited = globals.inhibited;
if (oldInhibited) {
globals.revokeInhibitions();
} else {
// Effectively "in a year" is "until turned off"
......@@ -501,7 +502,10 @@ QtObject {
}
checkInhibition();
showDoNotDisturbOsd(globals.inhibited);
if (globals.inhibited !== oldInhibited) {
showDoNotDisturbOsd(globals.inhibited);
}
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment