From 1188615e8effff1088298ed2ce4a26c3945617e7 Mon Sep 17 00:00:00 2001 From: oscfdezdz <42654671+oscfdezdz@users.noreply.github.com> Date: Mon, 20 Nov 2023 08:39:04 +0100 Subject: [PATCH] comment-tile: Hide rating when zero Following extensions website behavior. Also covers the case where the author of the comment is the extension's creator. --- src/exm-comment-tile.blp | 1 - src/exm-comment-tile.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/exm-comment-tile.blp b/src/exm-comment-tile.blp index 1bb41d79..437a49d4 100644 --- a/src/exm-comment-tile.blp +++ b/src/exm-comment-tile.blp @@ -18,7 +18,6 @@ template $ExmCommentTile : Gtk.Widget { Gtk.Label author_badge { styles ["author-badge"] label: _("Author"); - visible: false; } $ExmRating rating { diff --git a/src/exm-comment-tile.c b/src/exm-comment-tile.c index d0786462..9c561b0a 100644 --- a/src/exm-comment-tile.c +++ b/src/exm-comment-tile.c @@ -98,7 +98,7 @@ exm_comment_tile_constructed (GObject *object) "rating", &score, NULL); - if (score >= 0 && score <= 5) + if (score >= 1 && score <= 5) { g_object_set (self->rating, "rating", score, NULL); gtk_widget_set_visible (GTK_WIDGET (self->rating), TRUE);