diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-08-14 08:35:19 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-08-14 08:35:19 -0400 |
commit | a8930cbabec21635a10e8cac4d2c0c79867f283d (patch) | |
tree | a622f8d94fa1b60753896640c1f8c1a5ebaf48e2 /web/react/components/new_channel.jsx | |
parent | b1d37e9c385f0d3e9bddd9dffe1570574dcdcab6 (diff) | |
parent | 2485b87b28a7fed1996d627b48dcd94f19002fc8 (diff) | |
download | chat-a8930cbabec21635a10e8cac4d2c0c79867f283d.tar.gz chat-a8930cbabec21635a10e8cac4d2c0c79867f283d.tar.bz2 chat-a8930cbabec21635a10e8cac4d2c0c79867f283d.zip |
Merge pull request #365 from mattermost/mm-1700
MM-1700 don't pull all channel data all the time
Diffstat (limited to 'web/react/components/new_channel.jsx')
-rw-r--r-- | web/react/components/new_channel.jsx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/web/react/components/new_channel.jsx b/web/react/components/new_channel.jsx index c22147022..b00376758 100644 --- a/web/react/components/new_channel.jsx +++ b/web/react/components/new_channel.jsx @@ -55,16 +55,16 @@ module.exports = React.createClass({ channel.description = this.refs.channel_desc.getDOMNode().value.trim(); channel.type = this.state.channelType; - var self = this; client.createChannel(channel, - function() { + function(data) { + $(this.refs.modal.getDOMNode()).modal('hide'); + + asyncClient.getChannel(data.id); + utils.switchChannel(data); + this.refs.display_name.getDOMNode().value = ''; this.refs.channel_name.getDOMNode().value = ''; this.refs.channel_desc.getDOMNode().value = ''; - - $(self.refs.modal.getDOMNode()).modal('hide'); - window.location = TeamStore.getCurrentTeamUrl() + '/channels/' + channel.name; - asyncClient.getChannels(true); }.bind(this), function(err) { state.serverError = err.message; |