Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 1bc9bad

Browse files
committed
Limit reaction sender tooltip to 6 people
This limits the number of senders shown in the reaction sender tooltip shown when hovering a reaction to 6 people followed by "and N others" for the rest. Fixes element-hq/element-web#9722
1 parent 0e5f0f2 commit 1bc9bad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/views/messages/ReactionsRowButtonTooltip.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import MatrixClientPeg from '../../../MatrixClientPeg';
2121
import sdk from '../../../index';
2222
import { unicodeToShort } from '../../../HtmlUtils';
2323
import { _t } from '../../../languageHandler';
24+
import { formatCommaSeparatedList } from '../../../utils/FormattingUtils';
2425

2526
export default class ReactionsRowButtonTooltip extends React.PureComponent {
2627
static propTypes = {
@@ -54,7 +55,7 @@ export default class ReactionsRowButtonTooltip extends React.PureComponent {
5455
{
5556
reactors: () => {
5657
return <div className="mx_ReactionsRowButtonTooltip_senders">
57-
{senders.join(", ")}
58+
{formatCommaSeparatedList(senders, 6)}
5859
</div>;
5960
},
6061
reactedWith: (sub) => {

0 commit comments

Comments
 (0)