From cbe7757bb4bd9da0695f178b1c8e294fdf9ac4d8 Mon Sep 17 00:00:00 2001 From: Matt Hamil Date: Wed, 20 Sep 2017 15:08:11 -0500 Subject: [PATCH] Reverting last commit (#2626) --- .../src/routers/StackRouter.js | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/packages/react-navigation/src/routers/StackRouter.js b/packages/react-navigation/src/routers/StackRouter.js index 99d733e3..5ba959da 100644 --- a/packages/react-navigation/src/routers/StackRouter.js +++ b/packages/react-navigation/src/routers/StackRouter.js @@ -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 */