[gnome-software/wip/ubuntu-xenial] snap: Correctly set app state to AS_APP_STATE_INSTALLED



commit b34dcdd5e56513ae87b84762a677621da34e9b41
Author: Robert Ancell <robert ancell canonical com>
Date:   Mon Jul 4 16:56:47 2016 +1200

    snap: Correctly set app state to AS_APP_STATE_INSTALLED

 src/plugins/gs-plugin-snap.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-snap.c b/src/plugins/gs-plugin-snap.c
index f51c0a3..90f1aa0 100644
--- a/src/plugins/gs-plugin-snap.c
+++ b/src/plugins/gs-plugin-snap.c
@@ -105,8 +105,11 @@ refine_app (GsPlugin *plugin, GsApp *app, JsonObject *package, gboolean from_sea
                        json_object_get_string_member (package, "update_available") : NULL;
                if (update_available)
                        gs_app_set_state (app, AS_APP_STATE_UPDATABLE);
-               else
+               else {
+                       if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE)
+                               gs_app_set_state (app, AS_APP_STATE_UNKNOWN);
                        gs_app_set_state (app, AS_APP_STATE_INSTALLED);
+               }
                size = json_object_get_int_member (package, "installed-size");
        } else if (g_strcmp0 (status, "not installed") == 0 || g_strcmp0 (status, "available") == 0) {
                gs_app_set_state (app, AS_APP_STATE_AVAILABLE);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]