mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Merge pull request #134 from nickago/MM-1313
Mm 1313 Made the typing notification more responsive/accurate
This commit is contained in:
@@ -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: "" };
|
||||
|
||||
Reference in New Issue
Block a user