summaryrefslogtreecommitdiffstats
path: root/web/react/components/rename_channel_modal.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-08-14 08:35:19 -0400
committerChristopher Speller <crspeller@gmail.com>2015-08-14 08:35:19 -0400
commita8930cbabec21635a10e8cac4d2c0c79867f283d (patch)
treea622f8d94fa1b60753896640c1f8c1a5ebaf48e2 /web/react/components/rename_channel_modal.jsx
parentb1d37e9c385f0d3e9bddd9dffe1570574dcdcab6 (diff)
parent2485b87b28a7fed1996d627b48dcd94f19002fc8 (diff)
downloadchat-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/rename_channel_modal.jsx')
-rw-r--r--web/react/components/rename_channel_modal.jsx10
1 files changed, 6 insertions, 4 deletions
diff --git a/web/react/components/rename_channel_modal.jsx b/web/react/components/rename_channel_modal.jsx
index 26593b7fa..93cb6ef21 100644
--- a/web/react/components/rename_channel_modal.jsx
+++ b/web/react/components/rename_channel_modal.jsx
@@ -63,12 +63,14 @@ module.exports = React.createClass({
Client.updateChannel(channel,
function(data, text, req) {
+ $(this.refs.modal.getDOMNode()).modal('hide');
+
+ AsyncClient.getChannel(channel.id);
+ utils.updateTabTitle(channel.display_name);
+ utils.updateAddressBar(channel.name);
+
this.refs.display_name.getDOMNode().value = "";
this.refs.channel_name.getDOMNode().value = "";
-
- $('#' + this.props.modalId).modal('hide');
- window.location.href = TeamStore.getCurrentTeamUrl() + '/channels/' + this.state.channel_name;
- AsyncClient.getChannels(true);
}.bind(this),
function(err) {
state.server_error = err.message;