summaryrefslogtreecommitdiffstats
path: root/web/react/components/channel_header.jsx
diff options
context:
space:
mode:
authornickago <ngonella@calpoly.edu>2015-07-03 13:04:06 -0700
committernickago <ngonella@calpoly.edu>2015-07-06 06:40:55 -0700
commit7c95df2766994028d6ca4564615a80efe889020c (patch)
treea01e4a46e8d84ff097e1ca69fe317434224a1790 /web/react/components/channel_header.jsx
parentb819b492bf3c5d1f2353b086dbf7b70fd6a98869 (diff)
downloadchat-7c95df2766994028d6ca4564615a80efe889020c.tar.gz
chat-7c95df2766994028d6ca4564615a80efe889020c.tar.bz2
chat-7c95df2766994028d6ca4564615a80efe889020c.zip
Force the extra info to update asych
Diffstat (limited to 'web/react/components/channel_header.jsx')
-rw-r--r--web/react/components/channel_header.jsx7
1 files changed, 7 insertions, 0 deletions
diff --git a/web/react/components/channel_header.jsx b/web/react/components/channel_header.jsx
index 48cb4d13b..68de80228 100644
--- a/web/react/components/channel_header.jsx
+++ b/web/react/components/channel_header.jsx
@@ -4,6 +4,7 @@
var ChannelStore = require('../stores/channel_store.jsx');
var UserStore = require('../stores/user_store.jsx');
var PostStore = require('../stores/post_store.jsx');
+var SocketStore = require('../stores/socket_store.jsx')
var UserProfile = require( './user_profile.jsx' );
var NavbarSearchBox =require('./search_bar.jsx');
var AsyncClient = require('../utils/async_client.jsx');
@@ -82,6 +83,7 @@ module.exports = React.createClass({
ChannelStore.addExtraInfoChangeListener(this._onChange);
PostStore.addSearchChangeListener(this._onChange);
UserStore.addChangeListener(this._onChange);
+ SocketStore.addChangeListener(this._onSocketChange);
},
componentWillUnmount: function() {
ChannelStore.removeChangeListener(this._onChange);
@@ -96,6 +98,11 @@ module.exports = React.createClass({
}
$(".channel-header__info .description").popover({placement : 'bottom', trigger: 'hover', html: true, delay: {show: 500, hide: 500}});
},
+ _onSocketChange: function(msg) {
+ if(msg.action === "new_user") {
+ AsyncClient.getChannelExtraInfo(true);
+ }
+ },
getInitialState: function() {
return getStateFromStores();
},