From 47cb5f0b283670b6369de01f3b825d0cacf80192 Mon Sep 17 00:00:00 2001
From: default
Date: Thu, 1 Jun 2023 17:28:38 +0200
Subject: Add a check Unicode char to mark those polls that were voted by the
user.
---
html.c | 6 ++++++
1 file changed, 6 insertions(+)
(limited to 'html.c')
diff --git a/html.c b/html.c
index d3f812b..fb9dd11 100644
--- a/html.c
+++ b/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(" 🗳 ", 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(" ✓ ", L("Voted"));
+ s = xs_str_cat(s, f2);
+ }
}
/* if this is our post, add the score */
--
cgit v1.2.3