[gnome-games/wip/exalm/metadata: 18/21] grilo-release-date: Make it closer to other metadata
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/metadata: 18/21] grilo-release-date: Make it closer to other metadata
- Date: Mon, 8 Oct 2018 21:43:19 +0000 (UTC)
commit f3d6a4c6caefb7de86f331e3486a9ef27668cb83
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Tue Oct 9 02:31:01 2018 +0500
grilo-release-date: Make it closer to other metadata
src/grilo/grilo-release-date.vala | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/grilo/grilo-release-date.vala b/src/grilo/grilo-release-date.vala
index 028a4536..cc697e03 100644
--- a/src/grilo/grilo-release-date.vala
+++ b/src/grilo/grilo-release-date.vala
@@ -4,18 +4,16 @@ public class Games.GriloReleaseDate : Object, ReleaseDate {
private GriloMedia media;
private DateTime release_date;
private bool resolving;
+ private bool resolved;
public GriloReleaseDate (GriloMedia media) {
this.media = media;
media.resolved.connect (on_media_resolved);
- resolving = false;
+ release_date = null;
}
public DateTime get_release_date () {
- if (resolving)
- return release_date;
-
- if (release_date != null)
+ if (resolving || resolved)
return release_date;
resolving = true;
@@ -40,6 +38,8 @@ public class Games.GriloReleaseDate : Object, ReleaseDate {
private void load_media_release_date (DateTime release) {
release_date = release;
+ resolved = true;
+
changed ();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]