[gnome-software] snap: Correctly set app state to AS_APP_STATE_INSTALLED
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] snap: Correctly set app state to AS_APP_STATE_INSTALLED
- Date: Mon, 4 Jul 2016 04:56:55 +0000 (UTC)
commit ff393e9274e8cf16008d72713169b19b41df8f2e
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 ad428e1..aad25c0 100644
--- a/src/plugins/gs-plugin-snap.c
+++ b/src/plugins/gs-plugin-snap.c
@@ -98,8 +98,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);
+ }
} 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]