[gnome-software/1688-reloading-view-upon-install: 65/68] gs-category-page: Ignore content load when the page is not active




commit 43c847312af6185b41cda3162c7bf07f23008adf
Author: Milan Crha <mcrha redhat com>
Date:   Mon Aug 22 16:51:15 2022 +0200

    gs-category-page: Ignore content load when the page is not active
    
    No need to load content of the category page when the page
    is not active.

 src/gs-category-page.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/gs-category-page.c b/src/gs-category-page.c
index ba57ed2c8..a254452bc 100644
--- a/src/gs-category-page.c
+++ b/src/gs-category-page.c
@@ -376,6 +376,9 @@ gs_category_page_load_category (GsCategoryPage *self)
 
        g_assert (self->subcategory != NULL);
 
+       if (!gs_page_is_active (GS_PAGE (self)))
+               return;
+
        featured_subcat = gs_category_find_child (self->category, "featured");
 
        g_cancellable_cancel (self->cancellable);


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