summaryrefslogtreecommitdiffstats
path: root/web/react/components/post_body.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/post_body.jsx')
-rw-r--r--web/react/components/post_body.jsx14
1 files changed, 2 insertions, 12 deletions
diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx
index 75e4d735e..27f7ad2de 100644
--- a/web/react/components/post_body.jsx
+++ b/web/react/components/post_body.jsx
@@ -3,8 +3,8 @@
import FileAttachmentList from './file_attachment_list.jsx';
import UserStore from '../stores/user_store.jsx';
-import PreferenceStore from '../stores/preference_store.jsx';
import * as Utils from '../utils/utils.jsx';
+import * as Emoji from '../utils/emoticons.jsx';
import Constants from '../utils/constants.jsx';
import * as TextFormatting from '../utils/text_formatting.jsx';
import twemoji from 'twemoji';
@@ -20,7 +20,6 @@ export default class PostBody extends React.Component {
this.isImgLoading = false;
this.handleUserChange = this.handleUserChange.bind(this);
- this.handlePreferenceChange = this.handlePreferenceChange.bind(this);
this.parseEmojis = this.parseEmojis.bind(this);
this.createEmbed = this.createEmbed.bind(this);
this.createImageEmbed = this.createImageEmbed.bind(this);
@@ -57,7 +56,7 @@ export default class PostBody extends React.Component {
twemoji.parse(ReactDOM.findDOMNode(this), {
className: 'emoji twemoji',
base: '',
- folder: Utils.getImagePathForEmoticon()
+ folder: Emoji.getImagePathForEmoticon()
});
}
@@ -71,7 +70,6 @@ export default class PostBody extends React.Component {
this.parseEmojis();
UserStore.addChangeListener(this.handleUserChange);
- PreferenceStore.addChangeListener(this.handlePreferenceChange);
}
componentDidUpdate() {
@@ -80,7 +78,6 @@ export default class PostBody extends React.Component {
componentWillUnmount() {
UserStore.removeChangeListener(this.handleUserChange);
- PreferenceStore.removeChangeListener(this.handlePreferenceChange);
}
handleUserChange() {
@@ -91,13 +88,6 @@ export default class PostBody extends React.Component {
}
}
- handlePreferenceChange() {
- $('.twemoji').each((idx, elem) => {
- elem.src = Utils.getImagePathForEmoticon(twemoji.convert.toCodePoint(elem.alt));
- });
- this.forceUpdate();
- }
-
componentWillReceiveProps(nextProps) {
const linkData = Utils.extractLinks(nextProps.post.message);
if (this.props.post.filenames.length === 0 && this.state.links && this.state.links.length > 0) {