@@ -39,7 +39,6 @@ import { workspaceUsesColumns } from "../workspace/workspace-tabs-state";
3939import { isSettingsRoute , settingsOpenIn } from "../settings/settings-navigation" ;
4040import { workspaceRoutesOf } from "./workspace-overlay-routes" ;
4141import { setNativelyPoppingWorkspaceRoute } from "../workspace/workspace-detail-selection" ;
42- import { useWorkspaceSidebarHeaderItem } from "./useWorkspaceSidebarHeaderItem" ;
4342import { useDeviceType , useNativeLayoutMetrics } from "../../native/native-layout-metrics" ;
4443
4544import { useAdaptiveWorkspaceLayout } from "./AdaptiveWorkspaceLayout" ;
@@ -94,26 +93,15 @@ function ColumnScreen(props: {
9493 readonly onDismiss : ( routeKey : string , native : boolean ) => void ;
9594 readonly onAppearance : ( type : "willAppear" | "didAppear" | "willDisappear" , key : string ) => void ;
9695 readonly onCompose ?: ( ) => void ;
97- /** Settings pages don't draw their own sidebar toggle, unlike threads and pull requests. */
98- readonly sidebarToggle ?: boolean ;
9996 readonly navigation : ViewProps [ "navigation" ] ;
10097} ) {
10198 const { descriptor } = props ;
10299 // Options a screen set inside this workspace tab slot, over its route's.
103- const slotOptions = slotScreenOptions (
100+ const options = slotScreenOptions (
104101 use ( WorkspaceSlotOptionsContext ) ,
105102 descriptor . route . key ,
106103 descriptor . options ,
107104 ) ;
108- const sidebarItem = useWorkspaceSidebarHeaderItem ( ) ;
109- // Swapping header components would unmount the native header config, which hides the bar.
110- const options =
111- props . sidebarToggle && ! slotOptions . unstable_headerLeftItems
112- ? ( {
113- ...slotOptions ,
114- unstable_headerLeftItems : ( ) => [ sidebarItem ] ,
115- } as AppNativeStackNavigationOptions as typeof slotOptions )
116- : slotOptions ;
117105 const [ presented , setPresented ] = useState ( false ) ;
118106 const primaryColumn = useMemo (
119107 ( ) =>
@@ -420,7 +408,6 @@ function WorkspaceColumns(
420408 key = { screenKey }
421409 screenKey = { screenKey }
422410 descriptor = { descriptor }
423- sidebarToggle = { inSettingsSlot }
424411 attached = { props . detail . some ( ( current ) => current . key === route . key ) }
425412 onDismiss = { handleNativeDismiss }
426413 onAppearance = { followCollapsedSplit }
0 commit comments