Skip to content

Commit 331889a

Browse files
fix(mobile): hide compose in the detail rail while starting a task (#33678)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 73fb49d commit 331889a

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎apps/mobile/src/features/layout/createWorkspaceStackNavigator.ios.tsx‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ const isPullRequestRoute = (route: Route) =>
9090
route.name === "PullRequestFile" ||
9191
route.name === "PullRequestFiles";
9292

93+
// Every step of starting a task, from the project picker to the draft thread itself.
94+
const isNewTaskRoute = (route: Route) =>
95+
route.name.startsWith("NewTask") ||
96+
route.name.startsWith("AddProject") ||
97+
(route.params !== undefined && "draft" in route.params && Boolean(route.params.draft));
98+
9399
/** Beside the list, the first Settings page shows on one native screen that swaps its content. */
94100
const SETTINGS_DETAIL_SCREEN = "settings-detail";
95101

@@ -157,13 +163,7 @@ function ColumnScreen(props: {
157163
options={options}
158164
canGoBack={!props.primary}
159165
column={props.primary ? "primary" : "detail"}
160-
onCompose={
161-
descriptor.route.params &&
162-
"draft" in descriptor.route.params &&
163-
descriptor.route.params.draft
164-
? undefined
165-
: props.onCompose
166-
}
166+
onCompose={isNewTaskRoute(descriptor.route) ? undefined : props.onCompose}
167167
/>
168168
<ColumnContent
169169
primary={sidebar}

0 commit comments

Comments
 (0)