From 00fd1a1c3eb99c9e441276a7ce8697a1582152b7 Mon Sep 17 00:00:00 2001 From: green Date: Sat, 29 Mar 2025 01:27:46 +0100 Subject: performance: functions to get the number of followers --- html.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'html.c') diff --git a/html.c b/html.c index b27db7a..4483dd7 100644 --- a/html.c +++ b/html.c @@ -821,11 +821,7 @@ xs_html *html_user_head(snac *user, const char *desc, const char *url) /* show metrics in og:description? */ if (xs_is_true(xs_dict_get(user->config, "show_contact_metrics"))) { - xs *fwers = follower_list(user); - xs *fwing = following_list(user); - - xs *s1 = xs_fmt(L("%d following, %d followers"), - xs_list_len(fwing), xs_list_len(fwers)); + xs *s1 = xs_fmt(L("%d following, %d followers"), following_list_len(user), follower_list_len(user)); s1 = xs_str_cat(s1, " ยท "); @@ -1166,11 +1162,7 @@ static xs_html *html_user_body(snac *user, int read_only) } if (xs_is_true(xs_dict_get(user->config, "show_contact_metrics"))) { - xs *fwers = follower_list(user); - xs *fwing = following_list(user); - - xs *s1 = xs_fmt(L("%d following, %d followers"), - xs_list_len(fwing), xs_list_len(fwers)); + xs *s1 = xs_fmt(L("%d following, %d followers"), following_list_len(user), follower_list_len(user)); xs_html_add(top_user, xs_html_tag("p", -- cgit v1.2.3