diff options
author | Asaad Mahmood <Unknowngi@live.com> | 2015-07-07 20:16:14 +0500 |
---|---|---|
committer | Asaad Mahmood <Unknowngi@live.com> | 2015-07-07 20:16:14 +0500 |
commit | 14f02b770b5b5ea65003ae6e885d52d619a3f836 (patch) | |
tree | 1ad8f9c232b1619c2865336514f8945a2983cda0 /web | |
parent | 73cb6904a1d8f365a41695f1b673975bc0228e9a (diff) | |
parent | 95b9f872882b367556ca2330eea8c8309db542e6 (diff) | |
download | chat-14f02b770b5b5ea65003ae6e885d52d619a3f836.tar.gz chat-14f02b770b5b5ea65003ae6e885d52d619a3f836.tar.bz2 chat-14f02b770b5b5ea65003ae6e885d52d619a3f836.zip |
Merge branch 'master' of https://github.com/mattermost/platform
Diffstat (limited to 'web')
-rw-r--r-- | web/react/components/msg_typing.jsx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/web/react/components/msg_typing.jsx b/web/react/components/msg_typing.jsx index 9d3904757..a6953028f 100644 --- a/web/react/components/msg_typing.jsx +++ b/web/react/components/msg_typing.jsx @@ -11,6 +11,11 @@ module.exports = React.createClass({ componentDidMount: function() { SocketStore.addChangeListener(this._onChange); }, + componentWillReceiveProps: function(newProps) { + if(this.props.channelId !== newProps.channelId) { + this.setState({text:""}); + } + }, componentWillUnmount: function() { SocketStore.removeChangeListener(this._onChange); }, @@ -37,6 +42,9 @@ module.exports = React.createClass({ }, 3000); } } + else if (msg.action == "posted" && msg.channel_id === this.props.channelId) { + this.setState({text:""}) + } }, getInitialState: function() { return { text: "" }; |