mirror of
https://github.com/status-im/react-navigation.git
synced 2025-02-24 09:08:15 +00:00
Fix drawer toggle (#3191)
* Fixed drawer toggle * Fixed drawer toggle * Update DrawerView.js
This commit is contained in:
parent
7a57c4e779
commit
e2e540c32d
@ -93,10 +93,10 @@ export default class DrawerView extends React.PureComponent<
|
||||
if (routes[index].routeName === drawerOpenRoute) {
|
||||
this._drawer.openDrawer();
|
||||
} else if (routes[index].routeName === drawerToggleRoute) {
|
||||
if (this._drawer.state.drawerShown) {
|
||||
this.props.navigation.navigate(drawerCloseRoute);
|
||||
} else {
|
||||
if (this.props.navigation.state.index === 0) {
|
||||
this.props.navigation.navigate(drawerOpenRoute);
|
||||
} else {
|
||||
this.props.navigation.navigate(drawerCloseRoute);
|
||||
}
|
||||
} else {
|
||||
this._drawer.closeDrawer();
|
||||
|
Loading…
x
Reference in New Issue
Block a user