[gnome-software/gnome-3-22] trivial: Set the display version on available flatpak components
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-22] trivial: Set the display version on available flatpak components
- Date: Tue, 7 Mar 2017 16:33:19 +0000 (UTC)
commit 1f422f48e9cda3f2f93c83388d4ab528f392ae9a
Author: Richard Hughes <richard hughsie com>
Date: Wed Feb 22 10:05:32 2017 +0000
trivial: Set the display version on available flatpak components
src/plugins/gs-flatpak.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/gs-flatpak.c b/src/plugins/gs-flatpak.c
index 4079588..b2b99b7 100644
--- a/src/plugins/gs-flatpak.c
+++ b/src/plugins/gs-flatpak.c
@@ -1779,13 +1779,21 @@ static void
gs_flatpak_refine_appstream_release (AsApp *item, GsApp *app)
{
AsRelease *rel = as_app_get_release_default (item);
- if (!gs_app_is_installed (app))
- return;
if (rel == NULL)
return;
if (as_release_get_version (rel) == NULL)
return;
- gs_app_set_version (app, as_release_get_version (rel));
+ switch (gs_app_get_state (app)) {
+ case AS_APP_STATE_INSTALLED:
+ case AS_APP_STATE_AVAILABLE:
+ case AS_APP_STATE_AVAILABLE_LOCAL:
+ gs_app_set_version (app, as_release_get_version (rel));
+ break;
+ default:
+ g_debug ("%s is not installed, so ignoring version of %s",
+ as_app_get_id (item), as_release_get_version (rel));
+ break;
+ }
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]