[gnome-software] Only reload the AppStream cache after the initial load has completed
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Only reload the AppStream cache after the initial load has completed
- Date: Mon, 28 Sep 2015 12:23:10 +0000 (UTC)
commit 876851756b29d43adc6ef3a0baabcbd4006e94f5
Author: Richard Hughes <richard hughsie com>
Date: Mon Sep 28 13:16:16 2015 +0100
Only reload the AppStream cache after the initial load has completed
We were actually loading the AppStream database twice at startup, which was causing the UI to flicker.
src/plugins/gs-plugin-appstream.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index 7de4cc7..53c22ce 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -93,9 +93,6 @@ gs_plugin_initialize (GsPlugin *plugin)
as_store_set_watch_flags (plugin->priv->store,
AS_STORE_WATCH_FLAG_ADDED |
AS_STORE_WATCH_FLAG_REMOVED);
- g_signal_connect (plugin->priv->store, "changed",
- G_CALLBACK (gs_plugin_appstream_store_changed_cb),
- plugin);
/* AppInstall does not ever give us a long description */
if (gs_plugin_check_distro_id (plugin, "debian") ||
@@ -228,6 +225,11 @@ gs_plugin_startup (GsPlugin *plugin, GError **error)
goto out;
}
+ /* watch for changes */
+ g_signal_connect (plugin->priv->store, "changed",
+ G_CALLBACK (gs_plugin_appstream_store_changed_cb),
+ plugin);
+
/* add search terms for apps not in the main source */
origins = gs_plugin_appstream_get_origins_hash (items);
for (i = 0; i < items->len; i++) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]