From faefc85248020d121c7e4d26c0aaf6589888d7e7 Mon Sep 17 00:00:00 2001 From: paulnjs Date: Mon, 24 Nov 2025 14:07:51 +0700 Subject: [PATCH 1/4] fix: Scan icon and bottom navigation button shown briefly in concierge chat --- .../getIsScreenWithNavigationTabBarFocused.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/Navigation/TopLevelNavigationTabBar/getIsScreenWithNavigationTabBarFocused.ts b/src/components/Navigation/TopLevelNavigationTabBar/getIsScreenWithNavigationTabBarFocused.ts index a7508da770d8..9f139f208cc6 100644 --- a/src/components/Navigation/TopLevelNavigationTabBar/getIsScreenWithNavigationTabBarFocused.ts +++ b/src/components/Navigation/TopLevelNavigationTabBar/getIsScreenWithNavigationTabBarFocused.ts @@ -1,15 +1,19 @@ import {findFocusedRoute} from '@react-navigation/native'; import type {NavigationState} from '@react-navigation/native'; -import {isSplitNavigatorName} from '@libs/Navigation/helpers/isNavigatorName'; +import NAVIGATORS from '@src/NAVIGATORS'; import SCREENS_WITH_NAVIGATION_TAB_BAR from './SCREENS_WITH_NAVIGATION_TAB_BAR'; function getIsScreenWithNavigationTabBarFocused(state: NavigationState) { const focusedRoute = findFocusedRoute(state); const routeName = focusedRoute?.params && 'screen' in focusedRoute.params ? (focusedRoute.params.screen as string) : focusedRoute?.name; + + if (routeName == NAVIGATORS.REPORTS_SPLIT_NAVIGATOR) { + return false; + } // We are checking if the focused route is a split navigator because there may be a brief moment where the navigator doesn't have state yet. // That mens we don't have screen with bottom tab focused. This caused glitching. - return SCREENS_WITH_NAVIGATION_TAB_BAR.includes(routeName ?? '') || isSplitNavigatorName(routeName); + return SCREENS_WITH_NAVIGATION_TAB_BAR.includes(routeName ?? ''); } export default getIsScreenWithNavigationTabBarFocused; From 6e46559b30fdb6fc3dfbb0accf3a7ca89ccc8339 Mon Sep 17 00:00:00 2001 From: paulnjs Date: Mon, 24 Nov 2025 14:21:01 +0700 Subject: [PATCH 2/4] fix lint --- .../getIsScreenWithNavigationTabBarFocused.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Navigation/TopLevelNavigationTabBar/getIsScreenWithNavigationTabBarFocused.ts b/src/components/Navigation/TopLevelNavigationTabBar/getIsScreenWithNavigationTabBarFocused.ts index 9f139f208cc6..511e07680196 100644 --- a/src/components/Navigation/TopLevelNavigationTabBar/getIsScreenWithNavigationTabBarFocused.ts +++ b/src/components/Navigation/TopLevelNavigationTabBar/getIsScreenWithNavigationTabBarFocused.ts @@ -8,7 +8,7 @@ function getIsScreenWithNavigationTabBarFocused(state: NavigationState) { const routeName = focusedRoute?.params && 'screen' in focusedRoute.params ? (focusedRoute.params.screen as string) : focusedRoute?.name; - if (routeName == NAVIGATORS.REPORTS_SPLIT_NAVIGATOR) { + if (routeName === NAVIGATORS.REPORTS_SPLIT_NAVIGATOR) { return false; } // We are checking if the focused route is a split navigator because there may be a brief moment where the navigator doesn't have state yet. From 578406da50f846324ff24a4989db11ef7adcce59 Mon Sep 17 00:00:00 2001 From: paulnjs Date: Mon, 24 Nov 2025 22:11:03 +0700 Subject: [PATCH 3/4] update code --- .../getIsScreenWithNavigationTabBarFocused.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/components/Navigation/TopLevelNavigationTabBar/getIsScreenWithNavigationTabBarFocused.ts b/src/components/Navigation/TopLevelNavigationTabBar/getIsScreenWithNavigationTabBarFocused.ts index 511e07680196..50354e88f6f5 100644 --- a/src/components/Navigation/TopLevelNavigationTabBar/getIsScreenWithNavigationTabBarFocused.ts +++ b/src/components/Navigation/TopLevelNavigationTabBar/getIsScreenWithNavigationTabBarFocused.ts @@ -1,6 +1,5 @@ import {findFocusedRoute} from '@react-navigation/native'; import type {NavigationState} from '@react-navigation/native'; -import NAVIGATORS from '@src/NAVIGATORS'; import SCREENS_WITH_NAVIGATION_TAB_BAR from './SCREENS_WITH_NAVIGATION_TAB_BAR'; function getIsScreenWithNavigationTabBarFocused(state: NavigationState) { @@ -8,9 +7,6 @@ function getIsScreenWithNavigationTabBarFocused(state: NavigationState) { const routeName = focusedRoute?.params && 'screen' in focusedRoute.params ? (focusedRoute.params.screen as string) : focusedRoute?.name; - if (routeName === NAVIGATORS.REPORTS_SPLIT_NAVIGATOR) { - return false; - } // We are checking if the focused route is a split navigator because there may be a brief moment where the navigator doesn't have state yet. // That mens we don't have screen with bottom tab focused. This caused glitching. return SCREENS_WITH_NAVIGATION_TAB_BAR.includes(routeName ?? ''); From 34f327e915ca28a8e77c142f4a7324a43dbad5fa Mon Sep 17 00:00:00 2001 From: paulnjs Date: Mon, 24 Nov 2025 22:12:43 +0700 Subject: [PATCH 4/4] update code --- .../getIsScreenWithNavigationTabBarFocused.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/Navigation/TopLevelNavigationTabBar/getIsScreenWithNavigationTabBarFocused.ts b/src/components/Navigation/TopLevelNavigationTabBar/getIsScreenWithNavigationTabBarFocused.ts index 50354e88f6f5..fca01eb67add 100644 --- a/src/components/Navigation/TopLevelNavigationTabBar/getIsScreenWithNavigationTabBarFocused.ts +++ b/src/components/Navigation/TopLevelNavigationTabBar/getIsScreenWithNavigationTabBarFocused.ts @@ -6,7 +6,6 @@ function getIsScreenWithNavigationTabBarFocused(state: NavigationState) { const focusedRoute = findFocusedRoute(state); const routeName = focusedRoute?.params && 'screen' in focusedRoute.params ? (focusedRoute.params.screen as string) : focusedRoute?.name; - // We are checking if the focused route is a split navigator because there may be a brief moment where the navigator doesn't have state yet. // That mens we don't have screen with bottom tab focused. This caused glitching. return SCREENS_WITH_NAVIGATION_TAB_BAR.includes(routeName ?? '');