summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2023-05-24 13:25:13 +0200
committerGravatar default2023-05-24 13:25:13 +0200
commit9cdb53de8e30f60d8d535cdb83bf53c59ada29e1 (patch)
tree58e94a2e6d9ecef93fc416b67f01d39f5aa0a9c1
parentShow the poll as closed if we already voted for it. (diff)
downloadpenes-snac2-9cdb53de8e30f60d8d535cdb83bf53c59ada29e1.tar.gz
penes-snac2-9cdb53de8e30f60d8d535cdb83bf53c59ada29e1.tar.xz
penes-snac2-9cdb53de8e30f60d8d535cdb83bf53c59ada29e1.zip
Hide the children for polls.
-rw-r--r--html.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/html.c b/html.c
index cca6d82..12d5f61 100644
--- a/html.c
+++ b/html.c
@@ -745,7 +745,7 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
745 if (strcmp(actor, snac->actor) != 0 && !valid_status(actor_get(snac, actor, NULL))) 745 if (strcmp(actor, snac->actor) != 0 && !valid_status(actor_get(snac, actor, NULL)))
746 return os; 746 return os;
747 747
748 s = xs_str_cat(s, "<div class=\"snac-score\">"); 748 s = xs_str_cat(s, "<div class=\"snac-score\">"); /** **/
749 749
750 if (strcmp(type, "Question") == 0) { 750 if (strcmp(type, "Question") == 0) {
751 /* add the ballot box emoji */ 751 /* add the ballot box emoji */
@@ -768,9 +768,9 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
768 s = xs_str_cat(s, "</div>\n"); 768 s = xs_str_cat(s, "</div>\n");
769 769
770 if (level == 0) 770 if (level == 0)
771 s = xs_str_cat(s, "<div class=\"snac-post\">\n"); 771 s = xs_str_cat(s, "<div class=\"snac-post\">\n"); /** **/
772 else 772 else
773 s = xs_str_cat(s, "<div class=\"snac-child\">\n"); 773 s = xs_str_cat(s, "<div class=\"snac-child\">\n"); /** **/
774 774
775 if (boosts == NULL) 775 if (boosts == NULL)
776 boosts = object_announces(id); 776 boosts = object_announces(id);
@@ -828,7 +828,7 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
828 s = html_msg_icon(snac, s, msg); 828 s = html_msg_icon(snac, s, msg);
829 829
830 /* add the content */ 830 /* add the content */
831 s = xs_str_cat(s, "<div class=\"e-content snac-content\">\n"); 831 s = xs_str_cat(s, "<div class=\"e-content snac-content\">\n"); /** **/
832 832
833 /* is it sensitive? */ 833 /* is it sensitive? */
834 if (!xs_is_null(v = xs_dict_get(msg, "sensitive")) && xs_type(v) == XSTYPE_TRUE) { 834 if (!xs_is_null(v = xs_dict_get(msg, "sensitive")) && xs_type(v) == XSTYPE_TRUE) {
@@ -974,7 +974,7 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
974 /* add the attachments */ 974 /* add the attachments */
975 char *attach; 975 char *attach;
976 976
977 if ((attach = xs_dict_get(msg, "attachment")) != NULL) { 977 if ((attach = xs_dict_get(msg, "attachment")) != NULL) { /** **/
978 char *v; 978 char *v;
979 while (xs_list_iter(&attach, &v)) { 979 while (xs_list_iter(&attach, &v)) {
980 char *t = xs_dict_get(v, "mediaType"); 980 char *t = xs_dict_get(v, "mediaType");
@@ -1017,7 +1017,7 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
1017 s = html_entry_controls(snac, s, msg, md5); 1017 s = html_entry_controls(snac, s, msg, md5);
1018 1018
1019 /** children **/ 1019 /** children **/
1020 if (!hide_children) { 1020 if (!hide_children && strcmp(type, "Question") != 0) {
1021 xs *children = object_children(id); 1021 xs *children = object_children(id);
1022 int left = xs_list_len(children); 1022 int left = xs_list_len(children);
1023 1023