summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/sidebar.jsx12
1 files changed, 9 insertions, 3 deletions
diff --git a/webapp/components/sidebar.jsx b/webapp/components/sidebar.jsx
index 203464600..0651ebeee 100644
--- a/webapp/components/sidebar.jsx
+++ b/webapp/components/sidebar.jsx
@@ -69,6 +69,7 @@ export default class Sidebar extends React.Component {
this.isLeaving = new Map();
this.isSwitchingChannel = false;
+ this.closedDirectChannel = false;
const state = this.getStateFromStores();
state.newChannelModalType = '';
@@ -161,9 +162,13 @@ export default class Sidebar extends React.Component {
// close the LHS on mobile when you change channels
if (this.state.activeId !== prevState.activeId) {
- $('.app__body .inner-wrap').removeClass('move--right');
- $('.app__body .sidebar--left').removeClass('move--right');
- $('.multi-teams .team-sidebar').removeClass('move--right');
+ if (this.closedDirectChannel) {
+ this.closedDirectChannel = false;
+ } else {
+ $('.app__body .inner-wrap').removeClass('move--right');
+ $('.app__body .sidebar--left').removeClass('move--right');
+ $('.multi-teams .team-sidebar').removeClass('move--right');
+ }
}
}
@@ -349,6 +354,7 @@ export default class Sidebar extends React.Component {
}
if (channel.id === this.state.activeId) {
+ this.closedDirectChannel = true;
browserHistory.push('/' + this.state.currentTeam.name + '/channels/town-square');
}
}