From 4b848e0b090fc13b5d241223b2220bf9b42531c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Thu, 3 Sep 2026 15:12:41 -0700 Subject: [PATCH 1/2] NotificationsList: invalidate section sort when a new apptime is set --- src/Widgets/NotificationsList.vala | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Widgets/NotificationsList.vala b/src/Widgets/NotificationsList.vala index d47b7c0b..61a76f6b 100644 --- a/src/Widgets/NotificationsList.vala +++ b/src/Widgets/NotificationsList.vala @@ -111,6 +111,7 @@ public class Notifications.NotificationsList : Granite.Bin { unowned GLib.DateTime? time = app_datetime[notification.desktop_id]; if (time == null || time.compare (notification.timestamp) <= 0) { app_datetime[notification.desktop_id] = notification.timestamp; + sort_list_model.section_sorter.changed (DIFFERENT); } list_store.append (notification); From 93642bafc64879982c81ec361491b7d02bde6048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Thu, 3 Sep 2026 15:15:12 -0700 Subject: [PATCH 2/2] oopsie with model access --- src/Widgets/NotificationsList.vala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Widgets/NotificationsList.vala b/src/Widgets/NotificationsList.vala index 61a76f6b..2765c33c 100644 --- a/src/Widgets/NotificationsList.vala +++ b/src/Widgets/NotificationsList.vala @@ -19,6 +19,8 @@ public class Notifications.NotificationsList : Granite.Bin { } } + private Gtk.SortListModel sort_list_model; + construct { app_datetime = new GLib.HashTable (str_hash, str_equal); @@ -34,7 +36,7 @@ public class Notifications.NotificationsList : Granite.Bin { list_store = new GLib.ListStore (typeof (Notification)); - var sort_list_model = new Gtk.SortListModel (list_store, new Gtk.CustomSorter ((GLib.CompareDataFunc) Notification.compare)) { + sort_list_model = new Gtk.SortListModel (list_store, new Gtk.CustomSorter ((GLib.CompareDataFunc) Notification.compare)) { section_sorter = new Gtk.CustomSorter ((GLib.CompareDataFunc) section_func) };