@@ -5,12 +5,7 @@ import {
55} from "./navigation-tabs" ;
66import { useCallback , useMemo , useState , type ReactNode } from "react" ;
77import { View , useWindowDimensions , type NativeSyntheticEvent } from "react-native" ;
8- import {
9- Tabs ,
10- type TabSelectedEvent ,
11- type TabSelectionPreventedEvent ,
12- type TabSelectionRejectedEvent ,
13- } from "react-native-screens" ;
8+ import { Tabs , type TabSelectedEvent , type TabSelectionRejectedEvent } from "react-native-screens" ;
149
1510import { WorkspaceTabsContext , useWorkspaceTabs } from "./WorkspaceTabsContext" ;
1611import {
@@ -94,11 +89,6 @@ export function WorkspaceNativeTabs(props: {
9489 tabBarMinimizeBehavior : "never" ,
9590 tabBarTintColor : colors [ "--color-primary" ] ,
9691 } }
97- onTabSelectionPrevented = { ( {
98- nativeEvent,
99- } : NativeSyntheticEvent < TabSelectionPreventedEvent > ) => {
100- if ( nativeEvent . preventedScreenKey === "settings" ) selectTab ( "settings" ) ;
101- } }
10292 onTabSelectionRejected = { ( {
10393 nativeEvent,
10494 } : NativeSyntheticEvent < TabSelectionRejectedEvent > ) =>
@@ -108,7 +98,6 @@ export function WorkspaceNativeTabs(props: {
10898 setProvenance ( nativeEvent . provenance ) ;
10999 if ( nativeEvent . actionOrigin === "programmatic-js" ) return ;
110100 const tab = workspaceTabForNativeSlot ( primaryTabs , nativeEvent . selectedScreenKey ) ;
111- // UIKit sends reselects here even when preventNativeSelection is enabled.
112101 if ( tab ) selectTab ( tab ) ;
113102 } }
114103 >
@@ -123,7 +112,6 @@ export function WorkspaceNativeTabs(props: {
123112 screenKey = { slot }
124113 title = ""
125114 tabBarItemAccessibilityLabel = { settings ? "Settings" : WORKSPACE_TAB_LABELS [ tab ] }
126- preventNativeSelection = { settings }
127115 ios = { {
128116 icon : settings
129117 ? { type : "sfSymbol" , name : "gearshape" }
0 commit comments