commit fd326d1

green  ·  2025-06-16 19:07:11 +0000 UTC
parent 380e5b3
metadata: hide the divider when user has no normal fields
1 files changed,  +2, -2
M html.c
M html.c
+2, -2
 1@@ -3395,14 +3395,14 @@ xs_html *html_people_list(snac *user, xs_list *list, const char *header, const c
 2                 count++;
 3             }
 4 
 5-            if (count > 0) {
 6+            const xs_list *attachment = xs_dict_get(actor, "attachment");
 7+            if (count > 0 && xs_list_len(attachment) > 0) {
 8                 xs_html_add(snac_metadata,
 9                     xs_html_sctag("hr",
10                         xs_html_attr("class", "snac-property-divider")));
11             }
12 
13             const xs_val *v;
14-            const xs_list *attachment = xs_dict_get(actor, "attachment");
15             xs_list_foreach(attachment, v) {
16                 const char *type  = xs_dict_get(v, "type");
17                 const char *name  = xs_dict_get(v, "name");