[gnome-software/wip/hughsie/histogram-crash: 2/2] trivial: Don't show the histogram if there are no ratings



commit 8a721a65b462301c22f5f958395ef65c220fe7e6
Author: Richard Hughes <richard hughsie com>
Date:   Fri Feb 21 13:44:00 2020 +0000

    trivial: Don't show the histogram if there are no ratings

 src/gs-details-page.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index 4dd88a1e..6866367b 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -1574,7 +1574,7 @@ gs_details_page_refresh_reviews (GsDetailsPage *self)
        /* enable appropriate widgets */
        gtk_widget_set_visible (self->star, show_reviews);
        gtk_widget_set_visible (self->box_reviews, show_reviews);
-       gtk_widget_set_visible (self->histogram, review_ratings != NULL);
+       gtk_widget_set_visible (self->histogram, review_ratings != NULL && review_ratings->len > 0);
        gtk_widget_set_visible (self->label_review_count, n_reviews > 0);
 
        /* update the review label next to the star widget */


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