File tree Expand file tree Collapse file tree
apps/mobile/src/features/threads Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -184,6 +184,8 @@ export interface ThreadComposerProps {
184184 readonly followUpBehavior : FollowUpBehavior ;
185185 /** Whether the live turn can actually be steered by this provider. */
186186 readonly canSteerActiveTurn : boolean ;
187+ /** A question or failure card owns the slot; iOS destroys the hidden editor, so it remounts. */
188+ readonly hidden : boolean ;
187189 readonly editorRef ?: RefObject < ComposerEditorHandle | null > ;
188190 readonly onChangeDraftMessage : ( value : string ) => void ;
189191 readonly onPickDraftMedia : ( ) => Promise < void > ;
@@ -917,6 +919,7 @@ export const ThreadComposer = memo(function ThreadComposer(props: ThreadComposer
917919 layout = { COMPOSER_LAYOUT_TRANSITION }
918920 >
919921 < ComposerEditor
922+ key = { props . hidden ? "hidden" : "visible" }
920923 draftKey = { composerDraftKey }
921924 environmentId = { props . environmentId }
922925 onOpenMention = { ( path ) => {
Original file line number Diff line number Diff line change @@ -1390,7 +1390,7 @@ export const ThreadDetailScreen = memo(function ThreadDetailScreen(props: Thread
13901390 </ View >
13911391
13921392 { /* Hidden (not unmounted) while a user-input request owns the
1393- composer slot, so composer drafts and editor state survive .
1393+ composer slot, so the composer's state survives .
13941394 A rejected creation has no thread to send to; the failure card
13951395 owns the slot instead. */ }
13961396 < View style = { composerSlotHidden ? { display : "none" } : undefined } >
@@ -1460,6 +1460,7 @@ export const ThreadDetailScreen = memo(function ThreadDetailScreen(props: Thread
14601460 draftKey = { props . composerDraftKey ?? undefined }
14611461 followUpBehavior = { props . followUpBehavior }
14621462 canSteerActiveTurn = { props . canSteerActiveTurn }
1463+ hidden = { composerSlotHidden }
14631464 queuedEdit = {
14641465 props . queuedRunEdit === null
14651466 ? null
You can’t perform that action at this time.
0 commit comments