diff --git a/data/io.elementary.wingpanel.notifications.gschema.xml b/data/io.elementary.wingpanel.notifications.gschema.xml
index 599d92e1..a7da9307 100644
--- a/data/io.elementary.wingpanel.notifications.gschema.xml
+++ b/data/io.elementary.wingpanel.notifications.gschema.xml
@@ -6,5 +6,10 @@
The expanded state of the headers
The expanded state of the headers
+
+ true
+ Whether to keep notifications
+ Whether notifications are saved to persist accross reboots
+
diff --git a/src/Widgets/NotificationsList.vala b/src/Widgets/NotificationsList.vala
index ee006f86..9d91a3f9 100644
--- a/src/Widgets/NotificationsList.vala
+++ b/src/Widgets/NotificationsList.vala
@@ -28,6 +28,12 @@ public class Notifications.NotificationsList : Gtk.Bin {
private Gtk.ListBox listbox;
+ private static Settings settings;
+
+ static construct {
+ settings = new Settings ("io.elementary.wingpanel.notifications");
+ }
+
construct {
app_entries = new Gee.HashMap ();
table = new HashTable (str_hash, str_equal);
@@ -86,7 +92,7 @@ public class Notifications.NotificationsList : Gtk.Bin {
Idle.add (add_entry.callback);
yield;
- if (add_to_session) { // If notification was obtained from session do not write it back
+ if (add_to_session && settings.get_boolean ("keep-notifications")) { // If notification was obtained from session do not write it back
Session.get_instance ().add_notification (notification);
}