From a0e2b0450163b9d198abd4505ae1d66aa0824a71 Mon Sep 17 00:00:00 2001 From: Thomas Mathews Date: Fri, 30 Dec 2022 15:52:30 -0800 Subject: [PATCH] Fix reaction group count. --- js/ui/render.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/js/ui/render.js b/js/ui/render.js index a12f9fd..ad553e0 100644 --- a/js/ui/render.js +++ b/js/ui/render.js @@ -133,13 +133,14 @@ function render_reaction_group(model, emoji, reactions, reacting_to) { let str = ""; for (const k in reactions) { count++; - if (count > 5) { - str = `${count}`; - break; - } + if (count > 5) + continue; 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, reacting_to.id, emoji, reactions); return html`