From af35dcf9c4d303a807dbf2478b8721683e1d2dd3 Mon Sep 17 00:00:00 2001 From: Saturnino Abril Date: Thu, 6 Jul 2017 04:36:50 +0800 Subject: [PLT-6800] Clear center and rhs view on other window when leaving a channel (#6723) * clear center and rhs view on other window when leaving a channel * move redirection to websocket actions * close sidebar at websocket action --- webapp/actions/websocket_actions.jsx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'webapp/actions') diff --git a/webapp/actions/websocket_actions.jsx b/webapp/actions/websocket_actions.jsx index 9d53ead6b..dec3edd12 100644 --- a/webapp/actions/websocket_actions.jsx +++ b/webapp/actions/websocket_actions.jsx @@ -341,6 +341,11 @@ function handleUserRemovedEvent(msg) { $('#removed_from_channel').modal('show'); } + GlobalActions.toggleSideBarAction(false); + + const townsquare = ChannelStore.getByName('town-square'); + browserHistory.push(TeamStore.getCurrentTeamRelativeUrl() + '/channels/' + townsquare.name); + dispatch({ type: ChannelTypes.LEAVE_CHANNEL, data: {id: msg.data.channel_id, user_id: msg.broadcast.user_id} -- cgit v1.2.3-1-g7c22