mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-12-25 16:53:37 +00:00
Also show contact metrics in the public page, if the user wants.
This commit is contained in:
parent
93bc87ecb6
commit
a45a0d68e3
1 changed files with 12 additions and 0 deletions
12
html.c
12
html.c
|
@ -938,6 +938,18 @@ static xs_html *html_user_body(snac *user, int read_only)
|
|||
xs_html_add(top_user,
|
||||
snac_metadata);
|
||||
}
|
||||
|
||||
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_html_add(top_user,
|
||||
xs_html_tag("p",
|
||||
xs_html_text(s1)));
|
||||
}
|
||||
}
|
||||
|
||||
xs_html_add(body,
|
||||
|
|
Loading…
Reference in a new issue