From 88668ae1aa22964f58776b885bd16ae15648f1d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Thu, 3 Sep 2026 14:52:08 -0700 Subject: [PATCH] NotificationsList: replace placeholder with stack --- src/Widgets/NotificationsList.vala | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Widgets/NotificationsList.vala b/src/Widgets/NotificationsList.vala index d47b7c0b..3b52ece5 100644 --- a/src/Widgets/NotificationsList.vala +++ b/src/Widgets/NotificationsList.vala @@ -19,6 +19,8 @@ public class Notifications.NotificationsList : Granite.Bin { } } + private Gtk.Stack stack; + construct { app_datetime = new GLib.HashTable (str_hash, str_equal); @@ -43,10 +45,13 @@ public class Notifications.NotificationsList : Granite.Bin { selection_mode = NONE }; listbox.bind_model (sort_list_model, create_widget_func); - listbox.set_placeholder (placeholder); listbox.set_header_func (header_func); - child = listbox; + stack = new Gtk.Stack (); + stack.add_named (placeholder, "placeholder"); + stack.add_named (listbox, "list"); + + child = stack; insert_action_group (ACTION_GROUP_PREFIX, new NotificationsMonitor ().notifications_action_group); @@ -151,7 +156,10 @@ public class Notifications.NotificationsList : Granite.Bin { private void on_items_changed () { if (list_store.n_items == 0) { + stack.visible_child_name = "placeholder"; Session.get_instance ().clear (); + } else { + stack.visible_child_name = "list"; } items_changed ();