diff options
| author | 2023-06-01 17:28:38 +0200 | |
|---|---|---|
| committer | 2023-06-01 17:28:38 +0200 | |
| commit | 47cb5f0b283670b6369de01f3b825d0cacf80192 (patch) | |
| tree | 46e6ff84215a493f36d4dc9a74af2b6dd170e32e /html.c | |
| parent | Added an 'uninstall' Makefile target. (diff) | |
| download | snac2-47cb5f0b283670b6369de01f3b825d0cacf80192.tar.gz snac2-47cb5f0b283670b6369de01f3b825d0cacf80192.tar.xz snac2-47cb5f0b283670b6369de01f3b825d0cacf80192.zip | |
Add a check Unicode char to mark those polls that were voted by the user.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 6 |
1 files changed, 6 insertions, 0 deletions
| @@ -815,6 +815,12 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local, | |||
| 815 | /* add the ballot box emoji */ | 815 | /* add the ballot box emoji */ |
| 816 | xs *f = xs_fmt("<span title=\"%s\"> 🗳 </span>", L("Poll")); | 816 | xs *f = xs_fmt("<span title=\"%s\"> 🗳 </span>", L("Poll")); |
| 817 | s = xs_str_cat(s, f); | 817 | s = xs_str_cat(s, f); |
| 818 | |||
| 819 | if (was_question_voted(snac, id)) { | ||
| 820 | /* add a check to show this poll was voted */ | ||
| 821 | xs *f2 = xs_fmt("<span title=\"%s\"> ✓ </span>", L("Voted")); | ||
| 822 | s = xs_str_cat(s, f2); | ||
| 823 | } | ||
| 818 | } | 824 | } |
| 819 | 825 | ||
| 820 | /* if this is our post, add the score */ | 826 | /* if this is our post, add the score */ |