Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing Previous Chat Open On Escape Press #10152

Merged
merged 4 commits into from
Aug 2, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/libs/Navigation/AppNavigator/BaseDrawerNavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,23 @@ class BaseDrawerNavigator extends Component {
};
}

componentDidUpdate(prevProps) {
// You don't have to do this check first, but it can help prevent an unneeded render
syedsaroshfarrukhdot marked this conversation as resolved.
Show resolved Hide resolved
if (prevProps.isSmallScreenWidth === this.props.isSmallScreenWidth) {
return;
}
this.updateNavigationState(this.props.isSmallScreenWidth);
syedsaroshfarrukhdot marked this conversation as resolved.
Show resolved Hide resolved
}

// This Function will update Drawer Status to Open
updateNavigationState(props) {
this.setState({
defaultStatus: Navigation.getDefaultDrawerState(
syedsaroshfarrukhdot marked this conversation as resolved.
Show resolved Hide resolved
props,
),
});
}

render() {
const content = (
<Drawer.Navigator
Expand Down