Fix reaction group count.

This commit is contained in:
Thomas Mathews 2022-12-30 15:52:30 -08:00
parent 17d6c826e4
commit a0e2b04501

View file

@ -133,13 +133,14 @@ function render_reaction_group(model, emoji, reactions, reacting_to) {
let str = ""; let str = "";
for (const k in reactions) { for (const k in reactions) {
count++; count++;
if (count > 5) { if (count > 5)
str = `${count}`; continue;
break;
}
const pubkey = reactions[k].pubkey; const pubkey = reactions[k].pubkey;
str += render_pfp(pubkey, model_get_profile(model, pubkey).data, {noclick:true}); str += render_pfp(pubkey, model_get_profile(model, pubkey).data,
{noclick:true});
} }
if (count > 5)
str = `${count}`;
let onclick = render_react_onclick(model.pubkey, let onclick = render_react_onclick(model.pubkey,
reacting_to.id, emoji, reactions); reacting_to.id, emoji, reactions);
return html` return html`