[gnome-software] Move category appdata filtering to the correct function



commit 25149d9c6834e1242bf7655ee26aa81907c2dd01
Author: Kalev Lember <kalevlember gmail com>
Date:   Mon Jun 15 09:16:13 2015 +0200

    Move category appdata filtering to the correct function
    
    Commit 880c5bd71d62f13c5ff9ce6d2943eb4c3cc591c5 added the filtering to
    the function that returns _categories_, but we need to filter the _apps_
    inside the categories.

 src/gs-plugin-loader.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index f340f66..5d9e857 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -1988,13 +1988,6 @@ gs_plugin_loader_get_categories_thread_cb (GTask *task,
        for (l = state->list; l != NULL; l = l->next)
                gs_category_sort_subcategories (GS_CATEGORY (l->data));
 
-       /* only show apps with AppData */
-       if (g_settings_get_boolean (plugin_loader->priv->settings, "require-appdata")) {
-               gs_plugin_list_filter (&state->list,
-                                      gs_plugin_loader_get_app_has_appdata,
-                                      plugin_loader);
-       }
-
        /* success */
        if (state->list == NULL) {
                g_task_return_new_error (task,
@@ -2126,6 +2119,11 @@ gs_plugin_loader_get_category_apps_thread_cb (GTask *task,
        gs_plugin_list_filter (&state->list, gs_plugin_loader_app_is_non_system, NULL);
        gs_plugin_list_filter (&state->list, gs_plugin_loader_app_is_valid, state);
        gs_plugin_list_filter (&state->list, gs_plugin_loader_get_app_is_compatible, plugin_loader);
+       if (g_settings_get_boolean (plugin_loader->priv->settings, "require-appdata")) {
+               gs_plugin_list_filter (&state->list,
+                                      gs_plugin_loader_get_app_has_appdata,
+                                      plugin_loader);
+       }
        if (state->list == NULL) {
                g_task_return_new_error (task,
                                         GS_PLUGIN_LOADER_ERROR,


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