fix(app): drop getId from workspace stack route
Expo Router maps getId to React Navigation getId, which reorders an already-mounted workspace screen on Android native-stack/Fabric. Keep workspace identity/retention outside the route-level API and leave a comment warning against re-adding it.
This commit is contained in:
@@ -815,14 +815,14 @@ function RootStack() {
|
|||||||
<Stack.Screen name="settings/[section]" />
|
<Stack.Screen name="settings/[section]" />
|
||||||
<Stack.Screen name="pair-scan" />
|
<Stack.Screen name="pair-scan" />
|
||||||
</Stack.Protected>
|
</Stack.Protected>
|
||||||
<Stack.Screen
|
{/*
|
||||||
name="h/[serverId]/workspace/[workspaceId]"
|
Do not add getId or dangerouslySingular back to the workspace route.
|
||||||
getId={({ params }) => {
|
Expo Router maps dangerouslySingular to React Navigation getId, and
|
||||||
const serverId = getRouteParamValue(params?.serverId);
|
getId repeatedly breaks Android native-stack/Fabric by reordering an
|
||||||
const workspaceId = getRouteParamValue(params?.workspaceId);
|
already-mounted workspace screen. Keep workspace identity/retention
|
||||||
return serverId && workspaceId ? `${serverId}:${workspaceId}` : undefined;
|
outside this route-level native-stack API.
|
||||||
}}
|
*/}
|
||||||
/>
|
<Stack.Screen name="h/[serverId]/workspace/[workspaceId]" />
|
||||||
<Stack.Screen name="h/[serverId]/agent/[agentId]" options={{ gestureEnabled: false }} />
|
<Stack.Screen name="h/[serverId]/agent/[agentId]" options={{ gestureEnabled: false }} />
|
||||||
<Stack.Screen name="h/[serverId]/index" />
|
<Stack.Screen name="h/[serverId]/index" />
|
||||||
<Stack.Screen name="h/[serverId]/sessions" />
|
<Stack.Screen name="h/[serverId]/sessions" />
|
||||||
|
|||||||
Reference in New Issue
Block a user