Skip to content
Merged
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: 3 additions & 1 deletion src/Widgets/NotificationsList.vala
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class Notifications.NotificationsList : Granite.Bin {
}
}

private Gtk.SortListModel sort_list_model;
private Gtk.Stack stack;

construct {
Expand All @@ -36,7 +37,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<GLib.Object>) Notification.compare)) {
sort_list_model = new Gtk.SortListModel (list_store, new Gtk.CustomSorter ((GLib.CompareDataFunc<GLib.Object>) Notification.compare)) {
section_sorter = new Gtk.CustomSorter ((GLib.CompareDataFunc<GLib.Object>) section_func)
};

Expand Down Expand Up @@ -116,6 +117,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);
Expand Down
Loading