[gnome-games] application: Wrap Game object in DatabaseGame



commit b4b598ebdaac9f40168fbf1e46fcf43a2bcb1cb0
Author: theawless <theawless gmail com>
Date:   Sun Aug 26 07:15:09 2018 +0530

    application: Wrap Game object in DatabaseGame
    
    This allows cacheing of metadata objects in the database.

 src/ui/application.vala | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/ui/application.vala b/src/ui/application.vala
index 111b38ae..23d4394f 100644
--- a/src/ui/application.vala
+++ b/src/ui/application.vala
@@ -221,7 +221,10 @@ public class Games.Application : Gtk.Application {
                load_game_list.begin ();
                ListStore list_store = new ListStore (typeof (Game));
                game_collection.game_added.connect ((game) => {
-                       list_store.append (game);
+                       if (database != null)
+                               list_store.append (new DatabaseGame (database, game));
+                       else
+                               list_store.append (game);
                });
 
                window = new ApplicationWindow (list_store);


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