diff options
author | =Corey Hulen <corey@hulen.com> | 2015-09-03 13:39:22 -0700 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-09-03 13:39:22 -0700 |
commit | 05d95d80a896d14474c7f7384d67b9edd524b922 (patch) | |
tree | 2fcc619c38175014813ffc7df34abad82e5d5b77 /web/react/components/rhs_comment.jsx | |
parent | 48ca3a4007c8b9c40a3bc3789563ed9992e9b64d (diff) | |
parent | 4f0c06114b61c92d982baac1c54ed80da93a9cc9 (diff) | |
download | chat-05d95d80a896d14474c7f7384d67b9edd524b922.tar.gz chat-05d95d80a896d14474c7f7384d67b9edd524b922.tar.bz2 chat-05d95d80a896d14474c7f7384d67b9edd524b922.zip |
Merge branch 'master' into PLT-12
Diffstat (limited to 'web/react/components/rhs_comment.jsx')
-rw-r--r-- | web/react/components/rhs_comment.jsx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/web/react/components/rhs_comment.jsx b/web/react/components/rhs_comment.jsx index e74ab7f13..f1a90102c 100644 --- a/web/react/components/rhs_comment.jsx +++ b/web/react/components/rhs_comment.jsx @@ -12,12 +12,14 @@ var FileAttachmentList = require('./file_attachment_list.jsx'); var Client = require('../utils/client.jsx'); var AsyncClient = require('../utils/async_client.jsx'); var ActionTypes = Constants.ActionTypes; +var twemoji = require('twemoji'); export default class RhsComment extends React.Component { constructor(props) { super(props); this.retryComment = this.retryComment.bind(this); + this.parseEmojis = this.parseEmojis.bind(this); this.state = {}; } @@ -51,6 +53,12 @@ export default class RhsComment extends React.Component { PostStore.updatePendingPost(post); this.forceUpdate(); } + parseEmojis() { + twemoji.parse(React.findDOMNode(this), {size: Constants.EMOJI_SIZE}); + } + componentDidMount() { + this.parseEmojis(); + } shouldComponentUpdate(nextProps) { if (!Utils.areStatesEqual(nextProps.post, this.props.post)) { return true; @@ -58,6 +66,9 @@ export default class RhsComment extends React.Component { return false; } + componentDidUpdate() { + this.parseEmojis(); + } render() { var post = this.props.post; @@ -161,7 +172,8 @@ export default class RhsComment extends React.Component { filenames={post.filenames} modalId={'rhs_comment_view_image_modal_' + post.id} channelId={post.channel_id} - userId={post.user_id} /> + userId={post.user_id} + /> ); } |