mirror of
https://github.com/status-im/react-navigation.git
synced 2025-02-24 00:58:20 +00:00
Reverting last commit (#2626)
This commit is contained in:
parent
7832ed72c0
commit
2b40182cd7
@ -75,8 +75,6 @@ export default (
|
||||
paths[routeName] = { re, keys, toPath: pathToRegexp.compile(pathPattern) };
|
||||
});
|
||||
|
||||
let inProgressNavigationRouteName = null;
|
||||
|
||||
return {
|
||||
getComponentForState(state: NavigationState): NavigationComponent {
|
||||
const activeChildRoute = state.routes[state.index];
|
||||
@ -143,26 +141,6 @@ export default (
|
||||
};
|
||||
}
|
||||
|
||||
if (passedAction.type === 'Navigation/BACK') {
|
||||
inProgressNavigationRouteName = null;
|
||||
}
|
||||
|
||||
if (
|
||||
action.type === NavigationActions.NAVIGATE &&
|
||||
passedAction.routeName !== 'DrawerOpen' &&
|
||||
passedAction.routeName !== 'DrawerClose'
|
||||
) {
|
||||
// Check if action wants to route to the route that is in-progress navigating
|
||||
if (
|
||||
inProgressNavigationRouteName !== null &&
|
||||
inProgressNavigationRouteName === passedAction.routeName
|
||||
) {
|
||||
inProgressNavigationRouteName = null;
|
||||
return;
|
||||
}
|
||||
inProgressNavigationRouteName = passedAction.routeName;
|
||||
}
|
||||
|
||||
// Check if a child scene wants to handle the action as long as it is not a reset to the root stack
|
||||
if (action.type !== NavigationActions.RESET || action.key !== null) {
|
||||
const keyIndex = action.key
|
||||
@ -244,7 +222,6 @@ export default (
|
||||
}
|
||||
|
||||
if (action.type === NavigationActions.SET_PARAMS) {
|
||||
inProgressNavigationRouteName = null;
|
||||
const lastRoute = state.routes.find(
|
||||
/* $FlowFixMe */
|
||||
(route: *) => route.key === action.key
|
||||
@ -296,7 +273,6 @@ export default (
|
||||
|
||||
if (action.type === NavigationActions.BACK) {
|
||||
let backRouteIndex = null;
|
||||
inProgressNavigationRouteName = null;
|
||||
if (action.key) {
|
||||
const backRoute = state.routes.find(
|
||||
/* $FlowFixMe */
|
||||
|
Loading…
x
Reference in New Issue
Block a user