summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-08-15 08:21:57 -0500
committerJoram Wilander <jwawilander@gmail.com>2016-08-15 09:21:57 -0400
commit52aa1120c5d1b09df9de039b9035d89850cebc3a (patch)
treea8bd38df7aaef01850227f370341b25f29e91cb3 /webapp
parentfdd7962d42b60d02f93e4343c11dc7dd7e766c38 (diff)
downloadchat-52aa1120c5d1b09df9de039b9035d89850cebc3a.tar.gz
chat-52aa1120c5d1b09df9de039b9035d89850cebc3a.tar.bz2
chat-52aa1120c5d1b09df9de039b9035d89850cebc3a.zip
PLT-3777 Channel URL name changes when display name is updated (#3795)
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/rename_channel_modal.jsx15
1 files changed, 0 insertions, 15 deletions
diff --git a/webapp/components/rename_channel_modal.jsx b/webapp/components/rename_channel_modal.jsx
index f83cf110f..46dbe1b89 100644
--- a/webapp/components/rename_channel_modal.jsx
+++ b/webapp/components/rename_channel_modal.jsx
@@ -2,7 +2,6 @@
// See License.txt for license information.
import ReactDOM from 'react-dom';
-import TeamStore from 'stores/team_store.jsx';
import * as Utils from 'utils/utils.jsx';
import Client from 'client/web_client.jsx';
import * as AsyncClient from 'utils/async_client.jsx';
@@ -11,7 +10,6 @@ import Constants from 'utils/constants.jsx';
import {intlShape, injectIntl, defineMessages, FormattedMessage} from 'react-intl';
import {Modal} from 'react-bootstrap';
-import {browserHistory} from 'react-router';
const holders = defineMessages({
required: {
@@ -57,7 +55,6 @@ export default class RenameChannelModal extends React.Component {
this.onNameChange = this.onNameChange.bind(this);
this.onDisplayNameChange = this.onDisplayNameChange.bind(this);
- this.displayNameKeyUp = this.displayNameKeyUp.bind(this);
this.state = {
displayName: props.channel.display_name,
@@ -167,9 +164,7 @@ export default class RenameChannelModal extends React.Component {
Client.updateChannel(
channel,
() => {
- const team = TeamStore.getCurrent().name;
AsyncClient.getChannel(channel.id);
- browserHistory.replace(`/${team}/channels/${channel.name}`);
this.handleHide();
},
(err) => {
@@ -198,15 +193,6 @@ export default class RenameChannelModal extends React.Component {
this.setState({displayName: ReactDOM.findDOMNode(this.refs.displayName).value});
}
- displayNameKeyUp() {
- if (this.state.channelName !== Constants.DEFAULT_CHANNEL) {
- const displayName = ReactDOM.findDOMNode(this.refs.displayName).value.trim();
- const channelName = Utils.cleanUpUrlable(displayName);
- ReactDOM.findDOMNode(this.refs.channelName).value = channelName;
- this.setState({channelName});
- }
- }
-
render() {
let displayNameError = null;
let displayNameClass = 'form-group';
@@ -260,7 +246,6 @@ export default class RenameChannelModal extends React.Component {
/>
</label>
<input
- onKeyUp={this.displayNameKeyUp}
onChange={this.onDisplayNameChange}
type='text'
ref='displayName'