[gnome-games] collection-view: Check subpage is open before consuming input



commit ad5f68079a0f29188eb0e65e61ff40e97841d3db
Author: Neville <nevilleantony98 gmail com>
Date:   Tue Aug 11 12:32:54 2020 +0530

    collection-view: Check subpage is open before consuming input
    
    Currently when an empty collection is opened the is_collection_empty
    property is set to false. This property alone was used to check if
    search should be disabled. That means whenever an empty collection was
    viewed and exited, search would no longer work because is_collection_
    empty prop is still true. So we now check whether collection subpage
    is open before checking if the current collection is empty to consume
    the input, so that search is disabled in those situations.
    
    This bug can't be seen as of now because we currently only support
    non-user collections which are hidden when empty.

 src/ui/collection-view.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/ui/collection-view.vala b/src/ui/collection-view.vala
index 6246c0c29..a7763a8f2 100644
--- a/src/ui/collection-view.vala
+++ b/src/ui/collection-view.vala
@@ -215,7 +215,7 @@ private class Games.CollectionView : Gtk.Box, UiView {
                if ((viewstack.visible_child == collections_page
                     && !collections_page.is_subpage_open) ||
                     is_empty_collection ||
-                    collections_page.is_collection_empty)
+                    (collections_page.is_subpage_open && collections_page.is_collection_empty))
                        return false;
 
                return search_bar.handle_event (event);


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