whoReacted: fix reaction count being off by one (#2209)
Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
parent
b9d0a1c563
commit
27696ed62a
|
@ -69,14 +69,14 @@ function getReactionsWithQueue(msg: Message, e: ReactionEmoji, type: number) {
|
||||||
function makeRenderMoreUsers(users: User[]) {
|
function makeRenderMoreUsers(users: User[]) {
|
||||||
return function renderMoreUsers(_label: string, _count: number) {
|
return function renderMoreUsers(_label: string, _count: number) {
|
||||||
return (
|
return (
|
||||||
<Tooltip text={users.slice(5).map(u => u.username).join(", ")} >
|
<Tooltip text={users.slice(4).map(u => u.username).join(", ")} >
|
||||||
{({ onMouseEnter, onMouseLeave }) => (
|
{({ onMouseEnter, onMouseLeave }) => (
|
||||||
<div
|
<div
|
||||||
className={AvatarStyles.moreUsers}
|
className={AvatarStyles.moreUsers}
|
||||||
onMouseEnter={onMouseEnter}
|
onMouseEnter={onMouseEnter}
|
||||||
onMouseLeave={onMouseLeave}
|
onMouseLeave={onMouseLeave}
|
||||||
>
|
>
|
||||||
+{users.length - 5}
|
+{users.length - 4}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Tooltip >
|
</Tooltip >
|
||||||
|
|
Loading…
Reference in a new issue