Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {findFocusedRoute} from '@react-navigation/native';
import type {NavigationState} from '@react-navigation/native';
import {isSplitNavigatorName} from '@libs/Navigation/helpers/isNavigatorName';
import SCREENS_WITH_NAVIGATION_TAB_BAR from './SCREENS_WITH_NAVIGATION_TAB_BAR';

function getIsScreenWithNavigationTabBarFocused(state: NavigationState) {
Expand All @@ -9,7 +8,7 @@ function getIsScreenWithNavigationTabBarFocused(state: NavigationState) {
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 ?? '') || isSplitNavigatorName(routeName);
return SCREENS_WITH_NAVIGATION_TAB_BAR.includes(routeName ?? '');
}

export default getIsScreenWithNavigationTabBarFocused;
Loading