Преглед на файлове

Add a check Unicode char to mark those polls that were voted by the user.

default преди 3 години
родител
ревизия
47cb5f0b28
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 6 0
      html.c

+ 6 - 0
html.c

@@ -815,6 +815,12 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
         /* add the ballot box emoji */
         xs *f = xs_fmt("<span title=\"%s\"> &#128499; </span>", L("Poll"));
         s = xs_str_cat(s, f);
+
+        if (was_question_voted(snac, id)) {
+            /* add a check to show this poll was voted */
+            xs *f2 = xs_fmt("<span title=\"%s\"> &#10003; </span>", L("Voted"));
+            s = xs_str_cat(s, f2);
+        }
     }
 
     /* if this is our post, add the score */