From 3a2e8e256a47338e1786766f4b142b3c8c2da53d Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Mon, 9 Jul 2018 15:46:54 -0400 Subject: [PATCH] Set the proper size to the drawer when device rotates (#1899) --- app/components/sidebars/main/main_sidebar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/sidebars/main/main_sidebar.js b/app/components/sidebars/main/main_sidebar.js index 48ecc89ed..5acda1a8d 100644 --- a/app/components/sidebars/main/main_sidebar.js +++ b/app/components/sidebars/main/main_sidebar.js @@ -93,7 +93,7 @@ export default class ChannelSidebar extends Component { } shouldComponentUpdate(nextProps, nextState) { - const {currentTeamId, isLandscape, teamsCount} = this.props; + const {currentTeamId, deviceWidth, isLandscape, teamsCount} = this.props; const {openDrawerOffset} = this.state; if (nextState.openDrawerOffset !== openDrawerOffset || nextState.show !== this.state.show) { @@ -101,7 +101,7 @@ export default class ChannelSidebar extends Component { } return nextProps.currentTeamId !== currentTeamId || - nextProps.isLandscape !== isLandscape || + nextProps.isLandscape !== isLandscape || nextProps.deviceWidth !== deviceWidth || nextProps.teamsCount !== teamsCount || this.state.lockMode !== nextState.lockMode; }