[gnome-games] collections-page: Correctly set is_showing_user_collection prop



commit c16149564789280f9e4d764e76d3190bf4933bcc
Author: Neville <nevilleantony98 gmail com>
Date:   Thu Aug 20 20:04:23 2020 +0530

    collections-page: Correctly set is_showing_user_collection prop
    
    This fixes the bug where "Remove" button is shown in unwanted pages
    whenever a non-empty user collection was last viewed. This happened
    because is_showing_user_collection was never updated when subpage
    was closed.

 src/ui/collections-page.vala | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/ui/collections-page.vala b/src/ui/collections-page.vala
index 0f088ca53..befa0c612 100644
--- a/src/ui/collections-page.vala
+++ b/src/ui/collections-page.vala
@@ -45,9 +45,9 @@ private class Games.CollectionsPage : Gtk.Bin {
                set {
                        _current_collection = value;
 
-                       if (current_collection != null)
-                               is_showing_user_collection = current_collection.get_collection_type () ==
-                                                            Collection.CollectionType.USER;
+                       is_showing_user_collection = current_collection != null &&
+                                                    current_collection.get_collection_type () ==
+                                                    Collection.CollectionType.USER;
                }
        }
 


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