[gnome-games/wip/exalm/cache2: 2/25] 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: 2/25] database-game: Use only one developer per game
- Date: Sun, 7 Oct 2018 07:28:33 +0000 (UTC)
commit 66798e88a13ae1be7ca9d39de36c262bc692ccee
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]