diff options
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 10 |
1 files changed, 9 insertions, 1 deletions
| @@ -1859,6 +1859,7 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, | |||
| 1859 | xs_list *p = children; | 1859 | xs_list *p = children; |
| 1860 | char *cmd5; | 1860 | char *cmd5; |
| 1861 | int cnt = 0; | 1861 | int cnt = 0; |
| 1862 | int o_cnt = 0; | ||
| 1862 | 1863 | ||
| 1863 | while (xs_list_iter(&p, &cmd5)) { | 1864 | while (xs_list_iter(&p, &cmd5)) { |
| 1864 | xs *chd = NULL; | 1865 | xs *chd = NULL; |
| @@ -1874,9 +1875,12 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, | |||
| 1874 | level + 1, cmd5, hide_children); | 1875 | level + 1, cmd5, hide_children); |
| 1875 | 1876 | ||
| 1876 | if (che != NULL) { | 1877 | if (che != NULL) { |
| 1877 | if (left > 3) | 1878 | if (left > 3) { |
| 1878 | xs_html_add(ch_older, | 1879 | xs_html_add(ch_older, |
| 1879 | che); | 1880 | che); |
| 1881 | |||
| 1882 | o_cnt++; | ||
| 1883 | } | ||
| 1880 | else | 1884 | else |
| 1881 | xs_html_add(ch_container, | 1885 | xs_html_add(ch_container, |
| 1882 | che); | 1886 | che); |
| @@ -1895,6 +1899,10 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, | |||
| 1895 | if (cnt == 0) | 1899 | if (cnt == 0) |
| 1896 | xs_html_add(ch_details, | 1900 | xs_html_add(ch_details, |
| 1897 | xs_html_attr("style", "display: none")); | 1901 | xs_html_attr("style", "display: none")); |
| 1902 | |||
| 1903 | if (o_cnt == 0 && ch_older) | ||
| 1904 | xs_html_add(ch_older, | ||
| 1905 | xs_html_attr("style", "display: none")); | ||
| 1898 | } | 1906 | } |
| 1899 | } | 1907 | } |
| 1900 | 1908 | ||