[gnome-games] platforms-view: Don't reset subview on is-active changes



commit 515fa75ce8a9c34848bae2b5905466f3880fb7a2
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Tue Jun 4 22:04:42 2019 +0500

    platforms-view: Don't reset subview on is-active changes
    
    Instead, do it when visible child changes in CollectionBox.

 src/ui/collection-box.vala | 2 ++
 src/ui/platforms-view.vala | 4 +---
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/ui/collection-box.vala b/src/ui/collection-box.vala
index 2627775d..06678f0c 100644
--- a/src/ui/collection-box.vala
+++ b/src/ui/collection-box.vala
@@ -162,6 +162,8 @@ private class Games.CollectionBox : Gtk.Box {
                        collection_view.filtering_text = search_bar.text;
                        collection_view.reset_scroll_position ();
                }
+
+               adaptive_state.is_subview_open = false;
        }
 
        [GtkCallback]
diff --git a/src/ui/platforms-view.vala b/src/ui/platforms-view.vala
index 02b9f5c7..cb72593f 100644
--- a/src/ui/platforms-view.vala
+++ b/src/ui/platforms-view.vala
@@ -62,10 +62,8 @@ private class Games.PlatformsView : Gtk.Bin {
 
                        _is_active = value;
 
-                       if (!_is_active) {
+                       if (!_is_active)
                                gamepad_browse.cancel_cursor_movement ();
-                               adaptive_state.is_subview_open = false;
-                       }
                }
        }
 


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