Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): review dictated drafts without opening the keyboard #12917

ClosedDwite(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/12917/headopened View on GitHub

Showing 2 changed files with 37 additions and 10 deletions.

x
0 of 2 viewed, 2 left
17 additions and 5 deletionsapps/mobile/src/features/threads/ThreadComposer.tsxModified
View file
@@ -121,6 +121,7 @@
* Used by the parent to compute the larger feed bottom inset when the composer is focused.
export const COMPOSER_EXPANDED_CHROME = 156;
+export const COMPOSER_DICTATION_REVIEW_CHROME = COMPOSER_EXPANDED_CHROME + 160 - 72;
​
export interface ThreadComposerProps {
readonly draftMessage: string;
@@ -140,6 +141,8 @@
readonly sendBlockedReason?: string | null;
readonly editorRef?: RefObject<ComposerEditorHandle | null>;
readonly onChangeDraftMessage: (value: string) => void;
+ readonly isReviewingDictation: boolean;
+ readonly onDictationComplete: () => void;
readonly onPickDraftMedia: () => Promise<void>;
readonly onPickDraftFiles: () => Promise<void>;
readonly onNativePasteImages: (uris: ReadonlyArray<string>) => Promise<void>;
@@ -394,7 +397,10 @@
ownerKey: composerOwnerKey,
draftMessage: props.draftMessage,
selection: composerMenu.selection,
- onChangeDraftMessage: props.onChangeDraftMessage,
+ onChangeDraftMessage: (message) => {
+ props.onChangeDraftMessage(message);
+ props.onDictationComplete();
+ },
onChangeSelection: composerMenu.onSelectionChange,
});