mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-10 03:50:38 +03:00
Use object_likes_len() and object_announces_len() in the post score.
This commit is contained in:
parent
83a68d635d
commit
2fd7e20380
6
html.c
6
html.c
@ -551,14 +551,14 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, int local, int level, cons
|
|||||||
|
|
||||||
/* if this is our post, add the score */
|
/* if this is our post, add the score */
|
||||||
if (xs_startswith(id, snac->actor)) {
|
if (xs_startswith(id, snac->actor)) {
|
||||||
likes = object_likes(id);
|
int n_likes = object_likes_len(id);
|
||||||
boosts = object_announces(id);
|
int n_boosts = object_announces_len(id);
|
||||||
|
|
||||||
/* alternate emojis: %d 👍 %d 🔁 */
|
/* alternate emojis: %d 👍 %d 🔁 */
|
||||||
|
|
||||||
xs *s1 = xs_fmt(
|
xs *s1 = xs_fmt(
|
||||||
"<div class=\"snac-score\">%d ★ %d ↺</div>\n",
|
"<div class=\"snac-score\">%d ★ %d ↺</div>\n",
|
||||||
xs_list_len(likes), xs_list_len(boosts));
|
n_likes, n_boosts);
|
||||||
|
|
||||||
s = xs_str_cat(s, s1);
|
s = xs_str_cat(s, s1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user