summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authorGravatar green2025-03-29 01:27:46 +0100
committerGravatar green2025-05-19 15:19:38 +0200
commit00fd1a1c3eb99c9e441276a7ce8697a1582152b7 (patch)
treea0431b0db7e73508ea2c02190fd0dbe9af961601 /html.c
parentOperations on the 'people' page redirects back to it instead of 'admin'. (diff)
downloadsnac2-00fd1a1c3eb99c9e441276a7ce8697a1582152b7.tar.gz
snac2-00fd1a1c3eb99c9e441276a7ce8697a1582152b7.tar.xz
snac2-00fd1a1c3eb99c9e441276a7ce8697a1582152b7.zip
performance: functions to get the number of followers
Diffstat (limited to 'html.c')
-rw-r--r--html.c12
1 files changed, 2 insertions, 10 deletions
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)
821 821
822 /* show metrics in og:description? */ 822 /* show metrics in og:description? */
823 if (xs_is_true(xs_dict_get(user->config, "show_contact_metrics"))) { 823 if (xs_is_true(xs_dict_get(user->config, "show_contact_metrics"))) {
824 xs *fwers = follower_list(user); 824 xs *s1 = xs_fmt(L("%d following, %d followers"), following_list_len(user), follower_list_len(user));
825 xs *fwing = following_list(user);
826
827 xs *s1 = xs_fmt(L("%d following, %d followers"),
828 xs_list_len(fwing), xs_list_len(fwers));
829 825
830 s1 = xs_str_cat(s1, " · "); 826 s1 = xs_str_cat(s1, " · ");
831 827
@@ -1166,11 +1162,7 @@ static xs_html *html_user_body(snac *user, int read_only)
1166 } 1162 }
1167 1163
1168 if (xs_is_true(xs_dict_get(user->config, "show_contact_metrics"))) { 1164 if (xs_is_true(xs_dict_get(user->config, "show_contact_metrics"))) {
1169 xs *fwers = follower_list(user); 1165 xs *s1 = xs_fmt(L("%d following, %d followers"), following_list_len(user), follower_list_len(user));
1170 xs *fwing = following_list(user);
1171
1172 xs *s1 = xs_fmt(L("%d following, %d followers"),
1173 xs_list_len(fwing), xs_list_len(fwers));
1174 1166
1175 xs_html_add(top_user, 1167 xs_html_add(top_user,
1176 xs_html_tag("p", 1168 xs_html_tag("p",