Typing notification disappears when message is sent

Этот коммит содержится в:
nickago
2015-07-06 08:43:45 -07:00
родитель 0b71537ff0
Коммит 8ac5f22337
2 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@@ -13,7 +13,7 @@ module.exports = React.createClass({
SocketStore.addChangeListener(this._onSocketChange);
},
componentWillUnmount: function() {
ChannelStore.removeDiffCHannelChangeListener(this._onChange);
ChannelStore.removeDiffChannelChangeListener(this._onChange);
SocketStore.removeChangeListener(this._onSocketChange);
},
_onChange: function() {
@@ -42,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: "" };

Просмотреть файл

@@ -228,8 +228,6 @@ var ChannelStore = assign({}, EventEmitter.prototype, {
ChannelStore.dispatchToken = AppDispatcher.register(function(payload) {
var action = payload.action;
//console.log(payload);
//console.log(action.type + " " + (action.msg ? action.msg.action : ""))
switch(action.type) {