commit c3aff2d

grunfink  ·  2026-02-14 15:26:44 +0000 UTC
parent 11140d0
Fixed mismatched following count.
1 files changed,  +7, -7
M html.c
M html.c
+7, -7
 1@@ -3712,12 +3712,12 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only,
 2 }
 3 
 4 
 5-xs_html *html_people_list(snac *user, xs_list *list, const char *header, const char *t, const char *proxy, int do_count)
 6+xs_html *html_people_list(snac *user, xs_list *list, const char *header, const char *t, const char *proxy, int count)
 7 {
 8     xs_html *snac_posts;
 9     xs *header_cnt;
10-    if (do_count)
11-        header_cnt = xs_fmt("%s - %d\n", header, xs_list_len(list));
12+    if (count > -1)
13+        header_cnt = xs_fmt("%s - %d\n", header, count);
14     else
15         header_cnt = xs_fmt("%s\n", header);
16 
17@@ -3965,12 +3965,12 @@ xs_str *html_people(snac *user)
18 
19     if (xs_list_len(pending) || xs_is_true(xs_dict_get(user->config, "approve_followers"))) {
20         xs_html_add(lists,
21-            html_people_list(user, pending, L("Pending follow confirmations"), "p", proxy, 1));
22+            html_people_list(user, pending, L("Pending follow confirmations"), "p", proxy, xs_list_len(pending)));
23     }
24 
25     xs_html_add(lists,
26-        html_people_list(user, wing, L("People you follow"), "i", proxy, 1),
27-        html_people_list(user, wers, L("People that follow you"), "e", proxy, 1));
28+        html_people_list(user, wing, L("People you follow"), "i", proxy, following_list_len(user)),
29+        html_people_list(user, wers, L("People that follow you"), "e", proxy, xs_list_len(wers)));
30 
31     xs_html *html = xs_html_tag("html",
32         html_user_head(user, NULL, NULL),
33@@ -4001,7 +4001,7 @@ xs_str *html_people_one(snac *user, const char *actor, const xs_list *list,
34     xs *foll = xs_list_append(xs_list_new(), actor);
35 
36     xs_html_add(lists,
37-        html_people_list(user, foll, L("Contact's posts"), "p", proxy, 0));
38+        html_people_list(user, foll, L("Contact's posts"), "p", proxy, -1));
39 
40     xs_html_add(body, lists);
41