[gnome-software: 5/38] malcontent: Inline a helper function




commit a55c2ba1345ad755f820e780251e12e0d5aea676
Author: Philip Withnall <pwithnall endlessos org>
Date:   Tue Jan 25 19:24:34 2022 +0000

    malcontent: Inline a helper function
    
    It was only called in one place, and this code will be refactored soon.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #1472

 plugins/malcontent/gs-plugin-malcontent.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)
---
diff --git a/plugins/malcontent/gs-plugin-malcontent.c b/plugins/malcontent/gs-plugin-malcontent.c
index ed94aad73..e87f2bb29 100644
--- a/plugins/malcontent/gs-plugin-malcontent.c
+++ b/plugins/malcontent/gs-plugin-malcontent.c
@@ -190,16 +190,6 @@ app_set_parental_quirks (GsPluginMalcontent *self,
        return filtered;
 }
 
-static MctAppFilter *
-query_app_filter (GsPluginMalcontent  *self,
-                  GCancellable        *cancellable,
-                  GError             **error)
-{
-       return mct_manager_get_app_filter (self->manager, getuid (),
-                                          MCT_GET_APP_FILTER_FLAGS_INTERACTIVE, cancellable,
-                                          error);
-}
-
 static gboolean
 reload_app_filter (GsPluginMalcontent  *self,
                    GCancellable        *cancellable,
@@ -209,7 +199,11 @@ reload_app_filter (GsPluginMalcontent  *self,
        g_autoptr(MctAppFilter) old_app_filter = NULL;
 
        /* Refresh the app filter. This blocks on a D-Bus request. */
-       new_app_filter = query_app_filter (self, cancellable, error);
+       new_app_filter = mct_manager_get_app_filter (self->manager,
+                                                    getuid (),
+                                                    MCT_GET_APP_FILTER_FLAGS_INTERACTIVE,
+                                                    cancellable,
+                                                    error);
 
        /* on failure, keep the old app filter around since it might be more
         * useful than nothing */


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