Set the proper size to the drawer when device rotates (#1899)

This commit is contained in:
Elias Nahum 2018-07-09 15:46:54 -04:00 committed by GitHub
parent 3bc93c8f38
commit 3a2e8e256a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}