diff --git a/data/notifications.gschema.xml b/data/notifications.gschema.xml index 7ffe2f4c..9f4fa18a 100644 --- a/data/notifications.gschema.xml +++ b/data/notifications.gschema.xml @@ -8,6 +8,10 @@ + + false + Notify despite Do Not Disturb is enabled + true Ask before allowing notifications diff --git a/src/DBus.vala b/src/DBus.vala index 2ffbd735..af45bdfb 100644 --- a/src/DBus.vala +++ b/src/DBus.vala @@ -113,14 +113,13 @@ public class Notifications.Server : Object { send_confirmation (app_icon, hints); } else { var notification = new Notifications.Notification (app_name, app_icon, summary, body, actions, hints); + var app_settings = new GLib.Settings.full ( + SettingsSchemaSource.get_default ().lookup ("io.elementary.notifications.applications", true), + null, + "/io/elementary/notifications/applications/%s/".printf (notification.app_id) + ); - if (!settings.get_boolean ("do-not-disturb") || notification.priority == GLib.NotificationPriority.URGENT) { - var app_settings = new GLib.Settings.full ( - SettingsSchemaSource.get_default ().lookup ("io.elementary.notifications.applications", true), - null, - "/io/elementary/notifications/applications/%s/".printf (notification.app_id) - ); - + if (!settings.get_boolean ("do-not-disturb") || app_settings.get_boolean ("bypass-do-not-disturb") || notification.priority == GLib.NotificationPriority.URGENT) { if (app_settings.get_boolean ("bubbles")) { if (bubbles.has_key (id) && bubbles[id] != null) { bubbles[id].replace (notification);