Skip to content

Commit 485332d

Browse files
authored
Merge pull request Expensify#45778 from software-mansion-labs/nav/fix-lhp-rhp-from-link
Settings - Left hand menu and RHP do not open instantly when opening from link
2 parents 757a6ac + 9969f59 commit 485332d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,8 @@ const addPolicyIDToRoute = (route: NavigationPartialRoute, policyID?: string) =>
6161
};
6262

6363
function createBottomTabNavigator(route: NavigationPartialRoute<BottomTabName>, policyID?: string): NavigationPartialRoute<typeof NAVIGATORS.BOTTOM_TAB_NAVIGATOR> {
64-
const routesForBottomTabNavigator: Array<NavigationPartialRoute<BottomTabName>> = [{name: SCREENS.HOME, params: {policyID}}];
65-
66-
if (route.name !== SCREENS.HOME) {
67-
// If the generated state requires tab other than HOME, we need to insert it.
68-
routesForBottomTabNavigator.push(addPolicyIDToRoute(route, policyID) as NavigationPartialRoute<BottomTabName>);
69-
}
64+
const routesForBottomTabNavigator: Array<NavigationPartialRoute<BottomTabName>> = [];
65+
routesForBottomTabNavigator.push(addPolicyIDToRoute(route, policyID) as NavigationPartialRoute<BottomTabName>);
7066

7167
return {
7268
name: NAVIGATORS.BOTTOM_TAB_NAVIGATOR,

0 commit comments

Comments
 (0)