Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): keep the composer's draft and typing after answering a question #19281

MergedClaudesaul(GitHub profile, opens in a new tab)merged 5 commits intomain fromrefs/pull/19281/headmerged by juliusmarminge View on GitHub

Showing 3 changed files with 7 additions and 4 deletions.

x
0 of 3 viewed, 3 left
4 additions and 0 deletionsapps/mobile/src/components/ComposerEditor.tsxModified
View file
@@ -34,6 +34,7 @@
​
export type ComposerEditorProps = NativeComposerEditorProps & {
readonly draftKey?: string | null;
+ readonly hidden?: boolean;
readonly environmentId?: EnvironmentId;
readonly onOpenMention?: (path: string) => void;
readonly onOpenAttachment?: (attachment: ComposerDocumentAttachment) => void;
@@ -43,6 +44,7 @@
​
export function ComposerEditor({
draftKey,
+ hidden,
environmentId,
onOpenMention,
onOpenAttachment,
@@ -155,7 +157,9 @@
return (
+ {/* Reset revision history with the recreated iOS view without aborting context imports. */}
<NativeComposerEditor
+ key={hidden ? "hidden" : "visible"}
{...props}
enterBehavior={props.enterBehavior ?? preferredEnterBehavior}
onChangeText={changeText}