From 251f000c68ed384923d3b2bc6b3caea9aef2a089 Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Mon, 31 Jul 2017 18:54:34 +0200 Subject: [PLT-6710] /rename [text] slash command: Rename the channel (#6570) * /rename [text] slash command: Rename the channel * update strings per review --- webapp/components/navbar.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'webapp/components/navbar.jsx') diff --git a/webapp/components/navbar.jsx b/webapp/components/navbar.jsx index fc2ade7ab..81959f352 100644 --- a/webapp/components/navbar.jsx +++ b/webapp/components/navbar.jsx @@ -115,6 +115,7 @@ export default class Navbar extends React.Component { ModalStore.addModalListener(ActionTypes.TOGGLE_QUICK_SWITCH_MODAL, this.toggleQuickSwitchModal); ModalStore.addModalListener(ActionTypes.TOGGLE_CHANNEL_HEADER_UPDATE_MODAL, this.showEditChannelHeaderModal); ModalStore.addModalListener(ActionTypes.TOGGLE_CHANNEL_PURPOSE_UPDATE_MODAL, this.showChannelPurposeModal); + ModalStore.addModalListener(ActionTypes.TOGGLE_CHANNEL_NAME_UPDATE_MODAL, this.showRenameChannelModal); $('.inner-wrap').click(this.hideSidebars); document.addEventListener('keydown', this.handleQuickSwitchKeyPress); } @@ -128,6 +129,7 @@ export default class Navbar extends React.Component { ModalStore.removeModalListener(ActionTypes.TOGGLE_QUICK_SWITCH_MODAL, this.toggleQuickSwitchModal); ModalStore.addModalListener(ActionTypes.TOGGLE_CHANNEL_HEADER_UPDATE_MODAL, this.hideEditChannelHeaderModal); ModalStore.addModalListener(ActionTypes.TOGGLE_CHANNEL_PURPOSE_UPDATE_MODAL, this.hideChannelPurposeModal); + ModalStore.addModalListener(ActionTypes.TOGGLE_CHANNEL_NAME_UPDATE_MODAL, this.hideRenameChannelModal); document.removeEventListener('keydown', this.handleQuickSwitchKeyPress); } @@ -218,9 +220,7 @@ export default class Navbar extends React.Component { }); } - showRenameChannelModal(e) { - e.preventDefault(); - + showRenameChannelModal() { this.setState({ showRenameChannelModal: true }); -- cgit v1.2.3-1-g7c22