diff options
| author | green <dandelions@disroot.org> | 2025-03-29 01:27:46 +0100 |
|---|---|---|
| committer | green <dandelions@disroot.org> | 2025-05-19 15:19:38 +0200 |
| commit | 00fd1a1c3eb99c9e441276a7ce8697a1582152b7 (patch) | |
| tree | a0431b0db7e73508ea2c02190fd0dbe9af961601 /html.c | |
| parent | 072ae21013dc924c6bb3378a2480b571a66aba98 (diff) | |
performance: functions to get the number of followers
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -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", |