[gnome-games/wip/exalm/cache2: 45/52] database-game: Use only one developer per game
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/cache2: 45/52] database-game: Use only one developer per game
- Date: Mon, 1 Oct 2018 16:44:18 +0000 (UTC)
commit a3b08c8321cc835a2a332310c55d0a0e13ae6396
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Mon Oct 1 02:08:49 2018 +0500
database-game: Use only one developer per game
Creating a new DatabaseDeveloper each time makes it impossible to connect
to developer signals and receive notifications, so only use one object.
src/database/database-game.vala | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/database/database-game.vala b/src/database/database-game.vala
index fe322f5b..f9175a72 100644
--- a/src/database/database-game.vala
+++ b/src/database/database-game.vala
@@ -8,9 +8,13 @@ private class Games.DatabaseGame : Object, Game {
private Database database;
private Game game;
+ private Developer developer;
+
public DatabaseGame (Database database, Game game) {
this.database = database;
this.game = game;
+
+ developer = database.get_developer (game.get_developer (), get_uid ());
}
public Uid get_uid () {
@@ -42,7 +46,7 @@ private class Games.DatabaseGame : Object, Game {
}
public Developer get_developer () {
- return database.get_developer (game.get_developer (), get_uid ());
+ return developer;
}
public Publisher get_publisher () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]