PLT-6885/PLT-6888 Fix custom emojis (#6694)

* Fix custom emojis

* Fix custom emoji reactions
Этот коммит содержится в:
Joram Wilander
2017-06-20 11:47:53 -04:00
коммит произвёл GitHub
родитель 2e6fd031d1
Коммит 414b208100
4 изменённых файлов: 7 добавлений и 22 удалений

Просмотреть файл

@@ -2,7 +2,7 @@
// See License.txt for license information.
import {connect} from 'react-redux';
import {getCustomEmojisAsMap} from 'mattermost-redux/selectors/entities/emojis';
import {getCustomEmojisByName} from 'mattermost-redux/selectors/entities/emojis';
import {getBool} from 'mattermost-redux/selectors/entities/preferences';
import {getCurrentUserMentionKeys, getUsersByUsername} from 'mattermost-redux/selectors/entities/users';
@@ -20,7 +20,7 @@ function makeMapStateToProps() {
let oldCustomEmoji;
return function mapStateToProps(state, ownProps) {
const newCustomEmoji = getCustomEmojisAsMap(state);
const newCustomEmoji = getCustomEmojisByName(state);
if (newCustomEmoji !== oldCustomEmoji) {
emojiMap = new EmojiMap(newCustomEmoji);
}

Просмотреть файл

@@ -20,7 +20,7 @@ function makeMapStateToProps() {
if (Emoji.EmojiIndicesByAlias.has(ownProps.emojiName)) {
emoji = Emoji.Emojis[Emoji.EmojiIndicesByAlias.get(ownProps.emojiName)];
} else {
emoji = ownProps.emojis[ownProps.emojiName];
emoji = ownProps.emojis.get(ownProps.emojiName);
}
return {

Просмотреть файл

@@ -4,7 +4,7 @@
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {makeGetReactionsForPost} from 'mattermost-redux/selectors/entities/posts';
import {getCustomEmojisAsMap} from 'mattermost-redux/selectors/entities/emojis';
import {getCustomEmojisByName} from 'mattermost-redux/selectors/entities/emojis';
import * as Actions from 'mattermost-redux/actions/posts';
@@ -17,7 +17,7 @@ function makeMapStateToProps() {
return {
...ownProps,
reactions: getReactionsForPost(state, ownProps.post.id),
emojis: getCustomEmojisAsMap(state)
emojis: getCustomEmojisByName(state)
};
};
}