mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-09 19:50:26 +03:00
Show bookmarked posts with an emoji.
This commit is contained in:
parent
1022f6db87
commit
5358136132
2
data.c
2
data.c
@ -1562,7 +1562,7 @@ int is_muted(snac *snac, const char *actor)
|
|||||||
int is_bookmarked(snac *user, const char *id)
|
int is_bookmarked(snac *user, const char *id)
|
||||||
/* returns true if this note is bookmarked */
|
/* returns true if this note is bookmarked */
|
||||||
{
|
{
|
||||||
return object_user_cache_in(user, "bookmark", id);
|
return object_user_cache_in(user, id, "bookmark");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
8
html.c
8
html.c
@ -1523,6 +1523,14 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
|
|||||||
xs_html_raw(" 📌 ")));
|
xs_html_raw(" 📌 ")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (user && is_bookmarked(user, id)) {
|
||||||
|
/* add a bookmark emoji */
|
||||||
|
xs_html_add(score,
|
||||||
|
xs_html_tag("span",
|
||||||
|
xs_html_attr("title", L("Bookmarked")),
|
||||||
|
xs_html_raw(" 🔖 ")));
|
||||||
|
}
|
||||||
|
|
||||||
if (strcmp(type, "Question") == 0) {
|
if (strcmp(type, "Question") == 0) {
|
||||||
/* add the ballot box emoji */
|
/* add the ballot box emoji */
|
||||||
xs_html_add(score,
|
xs_html_add(score,
|
||||||
|
Loading…
Reference in New Issue
Block a user