Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(android): opening a thread on a foldable no longer slides in #21044

Closedt3dotgg(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromfix/android-split-thread-no-slideopened View on GitHub

Showing 2 changed files with 14 additions and 3 deletions.

x
0 of 2 viewed, 2 left
8 additions and 0 deletionsapps/mobile/src/lib/android-workspace-navigation.tsModified
View file
@@ -31,3 +31,11 @@
],
};
+​
+// In the split view these destinations swap the detail pane beside the sidebar instead of
+// stacking over Home, so the default slide-in would show a layer that is not there.
+export function androidWorkspaceDestinationAnimation(routeName: string, usesSplitView: boolean) {
+ return usesSplitView && (routeName === "Thread" || routeName === "PullRequest")
+ ? ("none" as const)
+ : undefined;
+}
6 additions and 3 deletionsapps/mobile/src/Stack.tsxModified
View file
@@ -30,6 +30,7 @@
import { useResolveClassNames } from "uniwind";
​
import { AppText as Text } from "./components/ui/AppText";
+import { androidWorkspaceDestinationAnimation } from "./lib/android-workspace-navigation";
import { getCompactBrandHeaderOptions } from "./components/CompactBrandTitle";
import { WorkspaceRootScreen } from "./features/workspace/WorkspaceRootScreen";
import { AndroidWorkspaceTabsProvider } from "./features/workspace/AndroidWorkspaceTabsProvider";
@@ -1007,15 +1008,17 @@
export const RootStack = RootStackConfig.with(function AdaptiveRootStack({ Navigator }) {
const { width, height } = useWindowDimensions();
const nativeMetrics = useNativeLayoutMetrics();
- const usesWorkspaceFlowScreens =
- Platform.OS === "android" || deriveLayout({ width, height, nativeMetrics }).usesSplitView;