Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions data/notifications.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
<child name="applications" schema="io.elementary.notifications.applications" />
</schema>
<schema id="io.elementary.notifications.applications">
<key type="b" name="bypass-do-not-disturb">
<default>false</default>
<summary>Notify despite Do Not Disturb is enabled</summary>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Notify despite Do Not Disturb setting being enabled"

</key>
<key type="b" name="ask">
<default>true</default>
<summary>Ask before allowing notifications</summary>
Expand Down
13 changes: 6 additions & 7 deletions src/DBus.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Long line

if (app_settings.get_boolean ("bubbles")) {
if (bubbles.has_key (id) && bubbles[id] != null) {
bubbles[id].replace (notification);
Expand Down