Skip to content

Commit

Permalink
Merge pull request #44528 from truph01/fix/43585
Browse files Browse the repository at this point in the history
Fix: The entire page blinks when clicking Inbox
  • Loading branch information
puneetlath authored Jul 1, 2024
2 parents 486c070 + f465999 commit 5cebd3e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,12 @@ function BottomTabBar({isLoadingApp = false}: PurposeForUsingExpensifyModalProps
const chatTabBrickRoad = getChatTabBrickRoad(activeWorkspaceID);

const navigateToChats = useCallback(() => {
if (currentTabName === SCREENS.HOME) {
return;
}
const route = activeWorkspaceID ? (`/w/${activeWorkspaceID}/home` as Route) : ROUTES.HOME;
Navigation.navigate(route);
}, [activeWorkspaceID]);
}, [activeWorkspaceID, currentTabName]);

return (
<View style={styles.bottomTabBarContainer}>
Expand Down Expand Up @@ -106,6 +109,9 @@ function BottomTabBar({isLoadingApp = false}: PurposeForUsingExpensifyModalProps
<Tooltip text={translate('common.search')}>
<PressableWithFeedback
onPress={() => {
if (currentTabName === SCREENS.SEARCH.BOTTOM_TAB || currentTabName === SCREENS.SEARCH.CENTRAL_PANE) {
return;
}
interceptAnonymousUser(() => Navigation.navigate(ROUTES.SEARCH.getRoute(CONST.SEARCH.TAB.ALL)));
}}
role={CONST.ROLE.BUTTON}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,12 @@ function BottomTabBar({isLoadingApp = false}: PurposeForUsingExpensifyModalProps
const chatTabBrickRoad = getChatTabBrickRoad(activeWorkspaceID);

const navigateToChats = useCallback(() => {
if (currentTabName === SCREENS.HOME) {
return;
}
const route = activeWorkspaceID ? (`/w/${activeWorkspaceID}/home` as Route) : ROUTES.HOME;
Navigation.navigate(route);
}, [activeWorkspaceID]);
}, [activeWorkspaceID, currentTabName]);

return (
<View style={styles.bottomTabBarContainer}>
Expand Down Expand Up @@ -102,6 +105,9 @@ function BottomTabBar({isLoadingApp = false}: PurposeForUsingExpensifyModalProps
<Tooltip text={translate('common.search')}>
<PressableWithFeedback
onPress={() => {
if (currentTabName === SCREENS.SEARCH.BOTTOM_TAB || currentTabName === SCREENS.SEARCH.CENTRAL_PANE) {
return;
}
interceptAnonymousUser(() => Navigation.navigate(ROUTES.SEARCH.getRoute(CONST.SEARCH.TAB.ALL)));
}}
role={CONST.ROLE.BUTTON}
Expand Down

0 comments on commit 5cebd3e

Please sign in to comment.