Procházet zdrojové kódy

Add a pin emoji to pinned posts.

default před 3 roky
rodič
revize
4b1f060be8
1 změnil soubory, kde provedl 6 přidání a 0 odebrání
  1. 6 0
      html.c

+ 6 - 0
html.c

@@ -841,6 +841,12 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
 
 
     s = xs_str_cat(s, "<div class=\"snac-score\">"); /** **/
     s = xs_str_cat(s, "<div class=\"snac-score\">"); /** **/
 
 
+    if (is_pinned(snac, id)) {
+        /* add a pin emoji */
+        xs *f = xs_fmt("<span title=\"%s\"> &#128204; </span>", L("Pinned"));
+        s = xs_str_cat(s, f);
+    }
+
     if (strcmp(type, "Question") == 0) {
     if (strcmp(type, "Question") == 0) {
         /* add the ballot box emoji */
         /* add the ballot box emoji */
         xs *f = xs_fmt("<span title=\"%s\"> &#128499; </span>", L("Poll"));
         xs *f = xs_fmt("<span title=\"%s\"> &#128499; </span>", L("Poll"));