Fix reaction group count.
This commit is contained in:
parent
17d6c826e4
commit
a0e2b04501
1 changed files with 6 additions and 5 deletions
|
@ -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`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue