[gnome-games/wip/exalm/metadata: 5/21] grilo-description: Provide empty value
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/metadata: 5/21] grilo-description: Provide empty value
- Date: Mon, 8 Oct 2018 21:42:14 +0000 (UTC)
commit 55cb8b0e094b41095a0a77a91f0bf2da213afa70
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Tue Oct 9 02:15:28 2018 +0500
grilo-description: Provide empty value
Return empty string instead of null while it's loading.
src/grilo/grilo-description.vala | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/grilo/grilo-description.vala b/src/grilo/grilo-description.vala
index d257b3c4..813baeca 100644
--- a/src/grilo/grilo-description.vala
+++ b/src/grilo/grilo-description.vala
@@ -4,18 +4,16 @@ public class Games.GriloDescription : Object, Description {
private GriloMedia media;
private string description;
private bool resolving;
+ private bool resolved;
public GriloDescription (GriloMedia media) {
this.media = media;
media.resolved.connect (on_media_resolved);
- resolving = false;
+ description = "";
}
public string get_description () {
- if (resolving)
- return description;
-
- if (description != null)
+ if (resolving || resolved)
return description;
resolving = true;
@@ -40,6 +38,8 @@ public class Games.GriloDescription : Object, Description {
private void load_media_description (string description_string) {
description = description_string;
+ resolved = true;
+
changed ();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]