fix(mobile): keep composer within folded screen after resume (#13310)
This commit is contained in:
1 file changed
+5
-3
@@ -679,10 +679,12 @@ export const ThreadDetailScreen = memo(function ThreadDetailScreen(props: Thread
|
||||
const 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.View
|
||||
layout={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 the
|
||||
list's bottom inset, so any padding above the pill/composer
|
||||
|
||||
Reference in new issue
Block a user