[gnome-software/wip/temp/ubuntu-xenial-rebased: 135/329] Don't show removed sideloaded apps as installable
- From: Iain Lane <iainl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/temp/ubuntu-xenial-rebased: 135/329] Don't show removed sideloaded apps as installable
- Date: Fri, 29 Apr 2016 13:56:41 +0000 (UTC)
commit b79aa95cbe23743c13bdc09a27cce83f85ea25ed
Author: Robert Ancell <robert ancell canonical com>
Date: Thu Mar 3 11:22:24 2016 +1300
Don't show removed sideloaded apps as installable
src/plugins/gs-plugin-snappy.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-snappy.c b/src/plugins/gs-plugin-snappy.c
index 471b247..a526a8c 100644
--- a/src/plugins/gs-plugin-snappy.c
+++ b/src/plugins/gs-plugin-snappy.c
@@ -323,7 +323,11 @@ get_apps (GsPlugin *plugin, const gchar *sources, gchar **search_terms, GList **
gs_app_set_state (app, AS_APP_STATE_INSTALLED);
gs_app_set_size (app, json_object_get_int_member (package, "installed_size"));
}
- else if (g_strcmp0 (status, "not installed") == 0 || g_strcmp0 (status, "removed") == 0) {
+ else if (g_strcmp0 (status, "removed") == 0) {
+ // A removed app is only available if it can be downloaded (it might have been
sideloaded)
+ if (json_object_get_int_member (package, "download_size") > 0)
+ gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
+ } else if (g_strcmp0 (status, "not installed") == 0) {
gs_app_set_state (app, AS_APP_STATE_AVAILABLE);
gs_app_set_size (app, json_object_get_int_member (package, "download_size"));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]