Commit 14c91b2f authored by Alexander Mikhaylenko's avatar Alexander Mikhaylenko

application-window: Bind model only after loading

Instead of binding collection model at the window creation time, wait
until everything has been loaded to improve loading speed.
parent d60d44c1
Pipeline #57733 passed with stages
in 20 minutes and 47 seconds
......@@ -113,10 +113,12 @@ private class Games.ApplicationWindow : Gtk.ApplicationWindow {
private KonamiCode konami_code;
private ListModel collection;
private Game game_to_run;
public ApplicationWindow (ListModel collection) {
collection_box.collection = collection;
this.collection = collection;
collection.items_changed.connect (() => {
is_collection_empty = collection.get_n_items () == 0;
});
......@@ -740,6 +742,8 @@ private class Games.ApplicationWindow : Gtk.ApplicationWindow {
}
public void on_collection_loaded () {
collection_box.collection = collection;
content_box.transition_type = Gtk.StackTransitionType.CROSSFADE;
header_bar.transition_type = Gtk.StackTransitionType.CROSSFADE;
if (game_to_run != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment