mirror of
https://github.com/status-im/react-navigation.git
synced 2025-02-24 17:18:09 +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) {
|
if (routes[index].routeName === drawerOpenRoute) {
|
||||||
this._drawer.openDrawer();
|
this._drawer.openDrawer();
|
||||||
} else if (routes[index].routeName === drawerToggleRoute) {
|
} else if (routes[index].routeName === drawerToggleRoute) {
|
||||||
if (this._drawer.state.drawerShown) {
|
if (this.props.navigation.state.index === 0) {
|
||||||
this.props.navigation.navigate(drawerCloseRoute);
|
|
||||||
} else {
|
|
||||||
this.props.navigation.navigate(drawerOpenRoute);
|
this.props.navigation.navigate(drawerOpenRoute);
|
||||||
|
} else {
|
||||||
|
this.props.navigation.navigate(drawerCloseRoute);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this._drawer.closeDrawer();
|
this._drawer.closeDrawer();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user