Skip to content

Commit d4c682f

Browse files
committed
fix(mobile): keep a bottom gutter in compact iPad windows
1 parent 3bea350 commit d4c682f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎apps/mobile/src/features/threads/ThreadDetailScreen.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ import Animated, {
115115
} from "react-native-reanimated";
116116
import { useSafeAreaInsets } from "react-native-safe-area-context";
117117
import { useWorkspaceContentWidth } from "../layout/workspace-content-width";
118+
import { useAdaptiveWorkspaceLayout } from "../layout/adaptive-workspace-context";
118119
import { useNativeWorkspaceColumnsSupported } from "../../native/NativeWorkspaceColumns";
119120
import {
120121
useDeviceType,
@@ -504,6 +505,7 @@ const COMPOSER_HEIGHT_SETTLE_MS = 220;
504505

505506
export const ThreadDetailScreen = function ThreadDetailScreen(props: ThreadDetailScreenProps) {
506507
const usesNativeWorkspaceColumns = useNativeWorkspaceColumnsSupported();
508+
const { layout } = useAdaptiveWorkspaceLayout();
507509
const deviceType = useDeviceType();
508510
const workspace = useWorkspaceTabs();
509511
const sidebarSearchActive =
@@ -636,7 +638,9 @@ export const ThreadDetailScreen = function ThreadDetailScreen(props: ThreadDetai
636638
// The pill already adds its own gutter; iPad and Duo align its edge with the native bar.
637639
const alignedBottomInset =
638640
bottomBarInset ??
639-
(Platform.OS === "ios" && Platform.isPad ? Math.max(bottomSafeArea, 12) - 5 : undefined);
641+
(Platform.OS === "ios" && Platform.isPad
642+
? Math.max(bottomSafeArea, 12) - (layout.usesSplitView ? 5 : 0)
643+
: undefined);
640644
// The Duo's floating sidebar pill ends three points below the composer's usual gutter.
641645
const composerBottomInset = Math.max(
642646
0,

0 commit comments

Comments
 (0)