[gnome-software: 12/18] gs-overview-page: Tweak empty page handling




commit c605dfb5300dcc3d9616ae2cce0e2d10b25847f2
Author: Philip Withnall <pwithnall endlessos org>
Date:   Fri Mar 5 11:45:39 2021 +0000

    gs-overview-page: Tweak empty page handling
    
    It’s possible for all the featured apps to be filtered out, which would
    result in the carousel being hidden, but `priv->empty` still being set
    to false. Avoid that.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 src/gs-overview-page.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/gs-overview-page.c b/src/gs-overview-page.c
index 95f65cb8c..c5bf3c843 100644
--- a/src/gs-overview-page.c
+++ b/src/gs-overview-page.c
@@ -386,7 +386,7 @@ gs_overview_page_get_featured_cb (GObject *source_object,
        gtk_widget_set_visible (priv->featured_carousel, gs_app_list_length (list) > 0);
        gs_featured_carousel_set_apps (GS_FEATURED_CAROUSEL (priv->featured_carousel), list);
 
-       priv->empty = FALSE;
+       priv->empty = priv->empty && (gs_app_list_length (list) == 0);
 
 out:
        gs_overview_page_decrement_action_cnt (self);


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