[gnome-software: 6/8] gs-plugin-loader: Drop redundant re-fetching of refine flags




commit 456ab0cba0da6c698a781ac6b3042cd92bafa483
Author: Philip Withnall <pwithnall endlessos org>
Date:   Mon Dec 6 18:18:27 2021 +0000

    gs-plugin-loader: Drop redundant re-fetching of refine flags
    
    They’re already set correctly at this point.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #1472
    Helps: #1324

 lib/gs-plugin-loader.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 786a9db9a..733d631de 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -894,9 +894,6 @@ gs_plugin_loader_run_refine_filter (GsPluginLoaderHelper *helper,
 
        /* Add ODRS data if needed */
        if (plugin_loader->odrs_provider != NULL) {
-               if (refine_flags == GS_PLUGIN_REFINE_FLAGS_DEFAULT)
-                       refine_flags = gs_plugin_job_get_refine_flags (helper->plugin_job);
-
                if (!gs_odrs_provider_refine (plugin_loader->odrs_provider,
                                              list, refine_flags, cancellable, error))
                        return FALSE;
@@ -925,7 +922,7 @@ gs_plugin_loader_run_refine_internal (GsPluginLoaderHelper *helper,
 
        /* run each plugin */
        if (!gs_plugin_loader_run_refine_filter (helper, list,
-                                                GS_PLUGIN_REFINE_FLAGS_DEFAULT,
+                                                gs_plugin_job_get_refine_flags (helper->plugin_job),
                                                 cancellable, error)) {
                if (previous_list != NULL)
                        gs_plugin_job_set_list (helper->plugin_job, previous_list);


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