Merge pull request #3186 from matrix-org/jryans/reactions-allow-text

Allow diplayed reaction values to contain anything
This commit is contained in:
J. Ryan Stinnett 2019-07-05 16:35:06 +01:00 committed by GitHub
commit 74431fe8b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 16 deletions

View file

@ -20,7 +20,6 @@ import PropTypes from 'prop-types';
import sdk from '../../../index';
import { _t } from '../../../languageHandler';
import { isContentActionable } from '../../../utils/EventUtils';
import { isSingleEmoji } from '../../../HtmlUtils';
import MatrixClientPeg from '../../../MatrixClientPeg';
// The maximum number of reactions to initially show on a message.
@ -115,9 +114,6 @@ export default class ReactionsRow extends React.PureComponent {
const ReactionsRowButton = sdk.getComponent('messages.ReactionsRowButton');
let items = reactions.getSortedAnnotationsByKey().map(([content, events]) => {
if (!isSingleEmoji(content)) {
return null;
}
const count = events.size;
if (!count) {
return null;

View file

@ -101,7 +101,12 @@ export default class ReactionsRowButton extends React.PureComponent {
onMouseOver={this.onMouseOver}
onMouseOut={this.onMouseOut}
>
{content} {count}
<span className="mx_ReactionsRowButton_content">
{content}
</span>
<span className="mx_ReactionsRowButton_count">
{count}
</span>
{tooltip}
</span>;
}