mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-25 22:45:05 +00:00
Deleted the 'Older...' details tag because it's becoming too confusing.
This commit is contained in:
parent
09c782eaa6
commit
020b854675
1 changed files with 1 additions and 12 deletions
13
html.c
13
html.c
|
@ -753,9 +753,8 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, int local, int level, cons
|
||||||
|
|
||||||
/** children **/
|
/** children **/
|
||||||
xs *children = object_children(id);
|
xs *children = object_children(id);
|
||||||
int left = xs_list_len(children);
|
|
||||||
|
|
||||||
if (left) {
|
if (xs_list_len(children)) {
|
||||||
char *p, *cmd5;
|
char *p, *cmd5;
|
||||||
|
|
||||||
s = xs_str_cat(s, "<details open><summary>...</summary><p>\n");
|
s = xs_str_cat(s, "<details open><summary>...</summary><p>\n");
|
||||||
|
@ -765,25 +764,15 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, int local, int level, cons
|
||||||
else
|
else
|
||||||
s = xs_str_cat(s, "<div>\n");
|
s = xs_str_cat(s, "<div>\n");
|
||||||
|
|
||||||
if (left > 3) {
|
|
||||||
xs *s1 = xs_fmt("<details><summary>%s</summary>\n", L("Older..."));
|
|
||||||
s = xs_str_cat(s, s1);
|
|
||||||
}
|
|
||||||
|
|
||||||
p = children;
|
p = children;
|
||||||
while (xs_list_iter(&p, &cmd5)) {
|
while (xs_list_iter(&p, &cmd5)) {
|
||||||
xs *chd = NULL;
|
xs *chd = NULL;
|
||||||
object_get_by_md5(cmd5, &chd, NULL);
|
object_get_by_md5(cmd5, &chd, NULL);
|
||||||
|
|
||||||
if (left == 3)
|
|
||||||
s = xs_str_cat(s, "</details>\n");
|
|
||||||
|
|
||||||
if (chd != NULL)
|
if (chd != NULL)
|
||||||
s = html_entry(snac, s, chd, local, level + 1, cmd5);
|
s = html_entry(snac, s, chd, local, level + 1, cmd5);
|
||||||
else
|
else
|
||||||
snac_debug(snac, 2, xs_fmt("cannot read from timeline child %s", cmd5));
|
snac_debug(snac, 2, xs_fmt("cannot read from timeline child %s", cmd5));
|
||||||
|
|
||||||
left--;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
s = xs_str_cat(s, "</div>\n");
|
s = xs_str_cat(s, "</div>\n");
|
||||||
|
|
Loading…
Reference in a new issue