From d8eaa95eb2dea542d93a98ce12b3ba36cd639a45 Mon Sep 17 00:00:00 2001 From: grunfink Date: Sat, 11 Apr 2026 08:59:12 +0200 Subject: Even if follow metrics are available in the actor object, don't show if both are 0. --- html.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'html.c') diff --git a/html.c b/html.c index 148b8b2..07c6f7c 100644 --- a/html.c +++ b/html.c @@ -3810,13 +3810,17 @@ xs_html *html_people_list(snac *user, xs_list *list, const char *header, const c const xs_val *fwers = xs_dict_get(actor, "followers_count"); if (!xs_is_null(fwing) && !xs_is_null(fwers)) { - xs *s = xs_fmt(L("%d following, %d followers"), - (int) xs_number_get_l(fwing), (int) xs_number_get_l(fwers)); + int i_fwing = (int) xs_number_get_l(fwing); + int i_fwers = (int) xs_number_get_l(fwers); - xs_html_add(snac_post, - xs_html_tag("div", - xs_html_tag("p", - xs_html_text(s)))); + if (i_fwing || i_fwers) { + xs *s = xs_fmt(L("%d following, %d followers"), i_fwing, i_fwers); + + xs_html_add(snac_post, + xs_html_tag("div", + xs_html_tag("p", + xs_html_text(s)))); + } } /* add user metadata */ -- cgit