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

Commit

Permalink
Limit reaction sender tooltip to 6 people
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jryans committed May 20, 2019
1 parent 0e5f0f2 commit 1bc9bad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/views/messages/ReactionsRowButtonTooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import MatrixClientPeg from '../../../MatrixClientPeg';
import sdk from '../../../index';
import { unicodeToShort } from '../../../HtmlUtils';
import { _t } from '../../../languageHandler';
import { formatCommaSeparatedList } from '../../../utils/FormattingUtils';

export default class ReactionsRowButtonTooltip extends React.PureComponent {
static propTypes = {
Expand Down Expand Up @@ -54,7 +55,7 @@ export default class ReactionsRowButtonTooltip extends React.PureComponent {
{
reactors: () => {
return <div className="mx_ReactionsRowButtonTooltip_senders">
{senders.join(", ")}
{formatCommaSeparatedList(senders, 6)}
</div>;
},
reactedWith: (sub) => {
Expand Down

0 comments on commit 1bc9bad

Please sign in to comment.