[gnome-games/wip/exalm/spinner-performance: 19/19] application-window: Bind model only after loading



commit e8fc08ea9008b93a9dbd1ecc84235a00bb419bf6
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Sat Sep 22 15:55:40 2018 +0500

    application-window: Bind model only after loading

 src/ui/application-window.vala | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/ui/application-window.vala b/src/ui/application-window.vala
index 31ec9dff..3820bb88 100644
--- a/src/ui/application-window.vala
+++ b/src/ui/application-window.vala
@@ -113,8 +113,10 @@ private class Games.ApplicationWindow : Gtk.ApplicationWindow {
 
        private KonamiCode konami_code;
 
+       private ListModel collection;
+
        public ApplicationWindow (ListModel collection) {
-               collection_box.collection = collection;
+               this.collection = collection;
                collection.items_changed.connect (() => {
                        is_collection_empty = collection.get_n_items () == 0;
                });
@@ -712,6 +714,8 @@ private class Games.ApplicationWindow : Gtk.ApplicationWindow {
 
        public void on_collection_loaded () {
                if (ui_state == UiState.LOADING) {
+                       collection_box.collection = collection;
+
                        content_box.transition_type = Gtk.StackTransitionType.CROSSFADE;
                        header_bar.transition_type = Gtk.StackTransitionType.CROSSFADE;
                        ui_state = UiState.COLLECTION;


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