diff options
Diffstat (limited to 'web/react/components/channel_header.jsx')
-rw-r--r-- | web/react/components/channel_header.jsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/web/react/components/channel_header.jsx b/web/react/components/channel_header.jsx index 87b9cab04..db23a5831 100644 --- a/web/react/components/channel_header.jsx +++ b/web/react/components/channel_header.jsx @@ -64,9 +64,14 @@ export default class ChannelHeader extends React.Component { handleLeave() { Client.leaveChannel(this.state.channel.id, function handleLeaveSuccess() { + AppDispatcher.handleViewAction({ + type: ActionTypes.LEAVE_CHANNEL, + id: this.state.channel.id + }); + const townsquare = ChannelStore.getByName('town-square'); Utils.switchChannel(townsquare); - }, + }.bind(this), function handleLeaveError(err) { AsyncClient.dispatchError(err, 'handleLeave'); } |