[gnome-software/gnome-3-18] Use the AppStream state when loading from a store



commit 0d365593c1926d9e2fd588a5650ca1fee1b7f15a
Author: Richard Hughes <richard hughsie com>
Date:   Tue Sep 29 15:55:19 2015 +0100

    Use the AppStream state when loading from a store
    
    This lets us preserve the is-installed property of the application, which may
    happen when an AppData file is installed that matches something in the
    AppStream metadata.

 src/plugins/gs-plugin-appstream.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index eb430eb..e574e89 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -488,6 +488,9 @@ gs_plugin_refine_item (GsPlugin *plugin,
                case AS_APP_SOURCE_KIND_METAINFO:
                        gs_app_set_state (app, AS_APP_STATE_INSTALLED);
                        break;
+               case AS_APP_SOURCE_KIND_APPSTREAM:
+                       gs_app_set_state (app, as_app_get_state (item));
+                       break;
                default:
                        break;
                }


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