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 https://github.com/vector-im/riot-web/issues/9722pull/21833/head
parent
0e5f0f24cc
commit
1bc9badeac
|
@ -21,6 +21,7 @@ import MatrixClientPeg from '../../../MatrixClientPeg';
|
||||||
import sdk from '../../../index';
|
import sdk from '../../../index';
|
||||||
import { unicodeToShort } from '../../../HtmlUtils';
|
import { unicodeToShort } from '../../../HtmlUtils';
|
||||||
import { _t } from '../../../languageHandler';
|
import { _t } from '../../../languageHandler';
|
||||||
|
import { formatCommaSeparatedList } from '../../../utils/FormattingUtils';
|
||||||
|
|
||||||
export default class ReactionsRowButtonTooltip extends React.PureComponent {
|
export default class ReactionsRowButtonTooltip extends React.PureComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
|
@ -54,7 +55,7 @@ export default class ReactionsRowButtonTooltip extends React.PureComponent {
|
||||||
{
|
{
|
||||||
reactors: () => {
|
reactors: () => {
|
||||||
return <div className="mx_ReactionsRowButtonTooltip_senders">
|
return <div className="mx_ReactionsRowButtonTooltip_senders">
|
||||||
{senders.join(", ")}
|
{formatCommaSeparatedList(senders, 6)}
|
||||||
</div>;
|
</div>;
|
||||||
},
|
},
|
||||||
reactedWith: (sub) => {
|
reactedWith: (sub) => {
|
||||||
|
|
Loading…
Reference in New Issue