web: hide the reaction count when there's only one (#335)
A single reaction rendered as "🎉 1"; show just the emoji until a second person piles on. Matches the native feed, which already hides the lone 1.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 file changed,
+1
−1
web/static/apps/chat.js+1 −1
diff --git a/web/static/apps/chat.js b/web/static/apps/chat.js| index afca96a..403782f 100644 |
| --- a/web/static/apps/chat.js |
| +++ b/web/static/apps/chat.js |
| @@ -841,7 +841,7 @@ function buildReactionsRow(m, ctx) { |
| if (!r.count) continue; |
| const chip = document.createElement("button"); |
| chip.className = "reaction-chip" + (myReactions.has(`${m.sid}|${r.emoji}`) ? " mine" : ""); |
| - chip.textContent = `${r.emoji} ${r.count}`; |
| + chip.textContent = r.count > 1 ? `${r.emoji} ${r.count}` : r.emoji; |
| chip.onclick = (e) => { |
| e.stopPropagation(); |
| toggleReaction(m.sid, r.emoji, ctx); |