commit a45a0d6
default
·
2024-12-04 17:05:41 +0000 UTC
parent 93bc87e
Also show contact metrics in the public page, if the user wants.
1 files changed,
+12,
-0
M
html.c
M
html.c
+12,
-0
1@@ -938,6 +938,18 @@ static xs_html *html_user_body(snac *user, int read_only)
2 xs_html_add(top_user,
3 snac_metadata);
4 }
5+
6+ if (xs_is_true(xs_dict_get(user->config, "show_contact_metrics"))) {
7+ xs *fwers = follower_list(user);
8+ xs *fwing = following_list(user);
9+
10+ xs *s1 = xs_fmt(L("%d following %d followers"),
11+ xs_list_len(fwing), xs_list_len(fwers));
12+
13+ xs_html_add(top_user,
14+ xs_html_tag("p",
15+ xs_html_text(s1)));
16+ }
17 }
18
19 xs_html_add(body,