[gnome-games] collection-view: Handle collection_empty_changed signal



commit 510e347f465fbe5319180cc3d79995cfe9182966
Author: Neville <nevilleantony98 gmail com>
Date:   Thu Jul 30 20:54:32 2020 +0530

    collection-view: Handle collection_empty_changed signal
    
    This hides empty collections from the CollectionsPage by invalidating
    the CollectionsMainPage's flowbox filter.

 src/ui/collection-view.vala | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/ui/collection-view.vala b/src/ui/collection-view.vala
index 665c219ef..6246c0c29 100644
--- a/src/ui/collection-view.vala
+++ b/src/ui/collection-view.vala
@@ -138,6 +138,9 @@ private class Games.CollectionView : Gtk.Box, UiView {
 
        construct {
                collection_manager = Application.get_default ().get_collection_manager ();
+               collection_manager.collection_empty_changed.connect (() => {
+                       collections_page.invalidate_filter ();
+               });
 
                var icon_name = Config.APPLICATION_ID + "-symbolic";
                viewstack.child_set (games_page, "icon-name", icon_name);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]