[gnome-software/wip/kalev/shell-extensions-fixes: 4/10] shell extensions: Fix cache lookup when adding installed apps
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/kalev/shell-extensions-fixes: 4/10] shell extensions: Fix cache lookup when adding installed apps
- Date: Wed, 21 Feb 2018 10:10:03 +0000 (UTC)
commit a219a6db9301f085df121ce1911fe6dc8d1d35c4
Author: Kalev Lember <klember redhat com>
Date: Wed Feb 21 08:37:26 2018 +0100
shell extensions: Fix cache lookup when adding installed apps
We weren't actually using the cached data, but instead parsing again
each time.
plugins/shell-extensions/gs-plugin-shell-extensions.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plugins/shell-extensions/gs-plugin-shell-extensions.c
b/plugins/shell-extensions/gs-plugin-shell-extensions.c
index cf28cc0c..9bfc5b82 100644
--- a/plugins/shell-extensions/gs-plugin-shell-extensions.c
+++ b/plugins/shell-extensions/gs-plugin-shell-extensions.c
@@ -343,12 +343,13 @@ gs_plugin_add_installed (GsPlugin *plugin,
/* search in the cache */
app = gs_plugin_cache_lookup (plugin, ext_uuid);
- if (app == NULL) {
- app = gs_app_new (NULL);
+ if (app != NULL) {
gs_app_list_add (list, app);
+ continue;
}
/* parse the data into an GsApp */
+ app = gs_app_new (NULL);
ret = gs_plugin_shell_extensions_add_app (plugin,
app,
ext_uuid,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]