[gnome-software: 15/24] gs-category-page: Reorder some code in set_category() to be neater




commit a35f9d1c266e6bda989142001e494e385ce12b6a
Author: Philip Withnall <pwithnall endlessos org>
Date:   Thu Apr 22 14:58:08 2021 +0100

    gs-category-page: Reorder some code in set_category() to be neater
    
    This introduces no functional changes.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 src/gs-category-page.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/gs-category-page.c b/src/gs-category-page.c
index 8abfa93db..4c82f2e02 100644
--- a/src/gs-category-page.c
+++ b/src/gs-category-page.c
@@ -251,16 +251,16 @@ gs_category_page_set_category (GsCategoryPage *self, GsCategory *category)
        if (self->category == category)
                return;
 
-       /* save this */
-       g_set_object (&self->category, category);
-
-       /* find apps in this group */
+       /* set the category */
        featured_subcat = gs_category_find_child (category, "featured");
        all_subcat = gs_category_find_child (category, "all");
 
+       g_set_object (&self->category, category);
        g_set_object (&self->subcategory, all_subcat);
+
+       /* load the apps from it */
        if (all_subcat != NULL)
-               gs_category_page_reload (GS_PAGE (self));
+               gs_category_page_load_category (self);
 
        if (featured_subcat != NULL) {
                /* set up the placeholders as having the featured category is a good


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