summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authorGravatar default2024-12-04 18:05:41 +0100
committerGravatar default2024-12-04 18:05:41 +0100
commita45a0d68e3d8a942a2bf516d5086920dbcb3a862 (patch)
tree16fbed5bcfc57ce157a804dc602b9ec0b3e2f158 /html.c
parentNew user variable show_contact_metrics. (diff)
downloadsnac2-a45a0d68e3d8a942a2bf516d5086920dbcb3a862.tar.gz
snac2-a45a0d68e3d8a942a2bf516d5086920dbcb3a862.tar.xz
snac2-a45a0d68e3d8a942a2bf516d5086920dbcb3a862.zip
Also show contact metrics in the public page, if the user wants.
Diffstat (limited to 'html.c')
-rw-r--r--html.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/html.c b/html.c
index 9a01bea..97405fe 100644
--- a/html.c
+++ b/html.c
@@ -938,6 +938,18 @@ static xs_html *html_user_body(snac *user, int read_only)
938 xs_html_add(top_user, 938 xs_html_add(top_user,
939 snac_metadata); 939 snac_metadata);
940 } 940 }
941
942 if (xs_is_true(xs_dict_get(user->config, "show_contact_metrics"))) {
943 xs *fwers = follower_list(user);
944 xs *fwing = following_list(user);
945
946 xs *s1 = xs_fmt(L("%d following %d followers"),
947 xs_list_len(fwing), xs_list_len(fwers));
948
949 xs_html_add(top_user,
950 xs_html_tag("p",
951 xs_html_text(s1)));
952 }
941 } 953 }
942 954
943 xs_html_add(body, 955 xs_html_add(body,