TypeScript
fix(mobile): keep composer within folded screen after resume (#13310)
Alexdab9561cae88
diff --git a/apps/mobile/src/features/threads/ThreadDetailScreen.tsx b/apps/mobile/src/features/threads/ThreadDetailScreen.tsxindex e3224074886..14beefd6d17 100644--- a/apps/mobile/src/features/threads/ThreadDetailScreen.tsx+++ b/apps/mobile/src/features/threads/ThreadDetailScreen.tsx@@ -679,10 +679,12 @@ export const ThreadDetailScreen = memo(function ThreadDetailScreen(props: Threadconst isSplitLayout = layoutVariant === "split";const contentMaxWidth = isSplitLayout ? CHAT_CONTENT_MAX_WIDTH : undefined;const workspaceContentWidth = useWorkspaceContentWidth();+ // Clearing animated width can retain the unfolded width after Android resumes folded.+ // Assign both layouts explicitly so the dock always follows its current parent.const composerWidthStyle = useAnimatedStyle(() =>isSplitLayout && workspaceContentWidth !== null- ? { width: workspaceContentWidth.value, right: undefined }- : { width: undefined, right: 0 },+ ? { width: workspaceContentWidth.value }+ : { width: "100%" },);const selectedInstanceId = props.selectedThread.modelSelection.instanceId;useStreamingHaptics(props.selectedThread.id, props.selectedThreadFeed);@@ -964,7 +966,7 @@ export const ThreadDetailScreen = memo(function ThreadDetailScreen(props: Thread<Animated.Viewlayout={COMPOSER_LAYOUT_TRANSITION}pointerEvents="box-none"- style={[{ position: "absolute", bottom: 0, left: 0, right: 0 }, composerWidthStyle]}+ style={[{ position: "absolute", bottom: 0, left: 0 }, composerWidthStyle]}>{/* No paddingTop here: the overlay's measured height becomes thelist's bottom inset, so any padding above the pill/composer