summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornickago <ngonella@calpoly.edu>2015-07-06 08:43:45 -0700
committernickago <ngonella@calpoly.edu>2015-07-06 08:43:45 -0700
commit8ac5f2233750c621099abb51006bf6fb0adbbf74 (patch)
tree8b4a32d4a997dd762701212b9170c60a1c8ac963
parent0b71537ff0e117f6845fd9294fa9df34f483c6bb (diff)
downloadchat-8ac5f2233750c621099abb51006bf6fb0adbbf74.tar.gz
chat-8ac5f2233750c621099abb51006bf6fb0adbbf74.tar.bz2
chat-8ac5f2233750c621099abb51006bf6fb0adbbf74.zip
Typing notification disappears when message is sent
-rw-r--r--web/react/components/msg_typing.jsx5
-rw-r--r--web/react/stores/channel_store.jsx2
2 files changed, 4 insertions, 3 deletions
diff --git a/web/react/components/msg_typing.jsx b/web/react/components/msg_typing.jsx
index 3b97fb2ef..089412229 100644
--- a/web/react/components/msg_typing.jsx
+++ b/web/react/components/msg_typing.jsx
@@ -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: "" };
diff --git a/web/react/stores/channel_store.jsx b/web/react/stores/channel_store.jsx
index 3713999a6..4e52cccd3 100644
--- a/web/react/stores/channel_store.jsx
+++ b/web/react/stores/channel_store.jsx
@@ -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) {