[gnome-games] favorites-collection: Move code in construct to class constructor
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] favorites-collection: Move code in construct to class constructor
- Date: Fri, 31 Jul 2020 11:25:46 +0000 (UTC)
commit be071d64311c9d3f4d79abd70d9c86c745fd6c7e
Author: Neville <nevilleantony98 gmail com>
Date: Fri Jul 31 11:14:04 2020 +0530
favorites-collection: Move code in construct to class constructor
src/collection/favorites-collection.vala | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/collection/favorites-collection.vala b/src/collection/favorites-collection.vala
index ee3f5e2da..5cf5daf52 100644
--- a/src/collection/favorites-collection.vala
+++ b/src/collection/favorites-collection.vala
@@ -13,7 +13,9 @@ private class Games.FavoritesCollection : Object, Collection {
private ulong idle_id = 0;
- construct {
+ public FavoritesCollection (Database database) {
+ this.database = database;
+
var game_collection = Application.get_default ().get_collection ();
game_collection.game_added.connect (on_game_added);
game_collection.game_removed.connect (on_game_removed);
@@ -29,10 +31,6 @@ private class Games.FavoritesCollection : Object, Collection {
});
}
- public FavoritesCollection (Database database) {
- this.database = database;
- }
-
private void set_is_empty (bool value) {
if (is_empty == value)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]