Merge pull request #134 from nickago/MM-1313
Mm 1313 Made the typing notification more responsive/accurate
Этот коммит содержится в:
@@ -11,6 +11,11 @@ module.exports = React.createClass({
|
|||||||
componentDidMount: function() {
|
componentDidMount: function() {
|
||||||
SocketStore.addChangeListener(this._onChange);
|
SocketStore.addChangeListener(this._onChange);
|
||||||
},
|
},
|
||||||
|
componentWillReceiveProps: function(newProps) {
|
||||||
|
if(this.props.channelId !== newProps.channelId) {
|
||||||
|
this.setState({text:""});
|
||||||
|
}
|
||||||
|
},
|
||||||
componentWillUnmount: function() {
|
componentWillUnmount: function() {
|
||||||
SocketStore.removeChangeListener(this._onChange);
|
SocketStore.removeChangeListener(this._onChange);
|
||||||
},
|
},
|
||||||
@@ -37,6 +42,9 @@ module.exports = React.createClass({
|
|||||||
}, 3000);
|
}, 3000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (msg.action == "posted" && msg.channel_id === this.props.channelId) {
|
||||||
|
this.setState({text:""})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
return { text: "" };
|
return { text: "" };
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user