summaryrefslogtreecommitdiffstats
path: root/web/react/components/rename_channel_modal.jsx
diff options
context:
space:
mode:
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;