diff options
| author | 2025-06-16 21:07:11 +0200 | |
|---|---|---|
| committer | 2025-11-14 17:22:11 +0100 | |
| commit | fd326d139b06d4a8c9b85b5ab267d34190d48def (patch) | |
| tree | b01b28e5455e3eec851fccc9fbbd7457a4e668e6 /html.c | |
| parent | metadata: location and bday properties (diff) | |
| download | snac2-fd326d139b06d4a8c9b85b5ab267d34190d48def.tar.gz snac2-fd326d139b06d4a8c9b85b5ab267d34190d48def.tar.xz snac2-fd326d139b06d4a8c9b85b5ab267d34190d48def.zip | |
metadata: hide the divider when user has no normal fields
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -3395,14 +3395,14 @@ xs_html *html_people_list(snac *user, xs_list *list, const char *header, const c | |||
| 3395 | count++; | 3395 | count++; |
| 3396 | } | 3396 | } |
| 3397 | 3397 | ||
| 3398 | if (count > 0) { | 3398 | const xs_list *attachment = xs_dict_get(actor, "attachment"); |
| 3399 | if (count > 0 && xs_list_len(attachment) > 0) { | ||
| 3399 | xs_html_add(snac_metadata, | 3400 | xs_html_add(snac_metadata, |
| 3400 | xs_html_sctag("hr", | 3401 | xs_html_sctag("hr", |
| 3401 | xs_html_attr("class", "snac-property-divider"))); | 3402 | xs_html_attr("class", "snac-property-divider"))); |
| 3402 | } | 3403 | } |
| 3403 | 3404 | ||
| 3404 | const xs_val *v; | 3405 | const xs_val *v; |
| 3405 | const xs_list *attachment = xs_dict_get(actor, "attachment"); | ||
| 3406 | xs_list_foreach(attachment, v) { | 3406 | xs_list_foreach(attachment, v) { |
| 3407 | const char *type = xs_dict_get(v, "type"); | 3407 | const char *type = xs_dict_get(v, "type"); |
| 3408 | const char *name = xs_dict_get(v, "name"); | 3408 | const char *name = xs_dict_get(v, "name"); |