Fix JS error when hovering over reactions (#6710)
* Fix JS error when hovering over reactions * Fix autocomplete for custom emojis * Update to latest mattermost-redux
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f80003a975
Коммит
6bfb7ea3a9
@@ -41,6 +41,11 @@ export default class Reaction extends React.PureComponent {
|
||||
*/
|
||||
otherUsersCount: PropTypes.number.isRequired,
|
||||
|
||||
/*
|
||||
* Array of reactions by user
|
||||
*/
|
||||
reactions: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
|
||||
/*
|
||||
* The URL of the emoji image
|
||||
*/
|
||||
@@ -82,6 +87,11 @@ export default class Reaction extends React.PureComponent {
|
||||
this.props.actions.removeReaction(this.props.post.id, this.props.emojiName);
|
||||
}
|
||||
|
||||
loadMissingProfiles = () => {
|
||||
const ids = this.props.reactions.map((reaction) => reaction.user_id);
|
||||
this.props.actions.getMissingProfilesByIds(ids);
|
||||
}
|
||||
|
||||
render() {
|
||||
let currentUserReacted = false;
|
||||
const users = [];
|
||||
@@ -219,7 +229,7 @@ export default class Reaction extends React.PureComponent {
|
||||
{clickTooltip}
|
||||
</Tooltip>
|
||||
}
|
||||
onEnter={this.props.actions.getMissingProfilesByIds}
|
||||
onEnter={this.loadMissingProfiles}
|
||||
>
|
||||
<div
|
||||
className={className}
|
||||
|
||||
Ссылка в новой задаче
Block a user