summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authorGravatar default2022-12-18 20:57:34 +0100
committerGravatar default2022-12-18 20:57:34 +0100
commit020b8546757bca70037e49597558528497fdac50 (patch)
tree02d072ab56374a33ebaf0e20bd2d31a162fce03d /html.c
parentUpdated RELEASE_NOTES. (diff)
downloadsnac2-020b8546757bca70037e49597558528497fdac50.tar.gz
snac2-020b8546757bca70037e49597558528497fdac50.tar.xz
snac2-020b8546757bca70037e49597558528497fdac50.zip
Deleted the 'Older...' details tag because it's becoming too confusing.
Diffstat (limited to 'html.c')
-rw-r--r--html.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/html.c b/html.c
index 28cbfe3..d987761 100644
--- a/html.c
+++ b/html.c
@@ -753,9 +753,8 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, int local, int level, cons
753 753
754 /** children **/ 754 /** children **/
755 xs *children = object_children(id); 755 xs *children = object_children(id);
756 int left = xs_list_len(children);
757 756
758 if (left) { 757 if (xs_list_len(children)) {
759 char *p, *cmd5; 758 char *p, *cmd5;
760 759
761 s = xs_str_cat(s, "<details open><summary>...</summary><p>\n"); 760 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
765 else 764 else
766 s = xs_str_cat(s, "<div>\n"); 765 s = xs_str_cat(s, "<div>\n");
767 766
768 if (left > 3) {
769 xs *s1 = xs_fmt("<details><summary>%s</summary>\n", L("Older..."));
770 s = xs_str_cat(s, s1);
771 }
772
773 p = children; 767 p = children;
774 while (xs_list_iter(&p, &cmd5)) { 768 while (xs_list_iter(&p, &cmd5)) {
775 xs *chd = NULL; 769 xs *chd = NULL;
776 object_get_by_md5(cmd5, &chd, NULL); 770 object_get_by_md5(cmd5, &chd, NULL);
777 771
778 if (left == 3)
779 s = xs_str_cat(s, "</details>\n");
780
781 if (chd != NULL) 772 if (chd != NULL)
782 s = html_entry(snac, s, chd, local, level + 1, cmd5); 773 s = html_entry(snac, s, chd, local, level + 1, cmd5);
783 else 774 else
784 snac_debug(snac, 2, xs_fmt("cannot read from timeline child %s", cmd5)); 775 snac_debug(snac, 2, xs_fmt("cannot read from timeline child %s", cmd5));
785
786 left--;
787 } 776 }
788 777
789 s = xs_str_cat(s, "</div>\n"); 778 s = xs_str_cat(s, "</div>\n");