Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

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

Showing 2 changed files with 67 additions and 8 deletions.

x
0 of 2 viewed, 2 left
24 additions and 6 deletionsapps/mobile/src/features/threads/ThreadComposer.tsxModified
View file
@@ -128,6 +128,12 @@
​
export const COMPOSER_EXPANDED_CHROME = 156;
​
+const EXPANDED_EDITOR_MIN_HEIGHT = 72;
+const EXPANDED_EDITOR_MAX_HEIGHT = 160;
+​
+export const COMPOSER_DICTATION_REVIEW_CHROME =
+ COMPOSER_EXPANDED_CHROME + EXPANDED_EDITOR_MAX_HEIGHT - EXPANDED_EDITOR_MIN_HEIGHT;
+​
export interface ThreadComposerProps {
readonly canOperateThread: boolean;
readonly placeholder: string;
@@ -156,6 +162,9 @@
readonly canSteerActiveTurn: boolean;
readonly editorRef?: RefObject<ComposerEditorHandle | null>;
readonly onChangeDraftMessage: (value: string) => void;
+ readonly onDraftCleared: () => void;
+ readonly isReviewingDictation: boolean;
+ readonly onDictationComplete: () => void;
readonly onPickDraftMedia: () => Promise<void>;
readonly onPickDraftFiles: () => Promise<void>;
readonly onNativePasteImages: (uris: ReadonlyArray<string>) => Promise<void>;
@@ -457,7 +466,10 @@
readDraftMessage: () => getComposerDraftSnapshot(composerDraftKey).text,
subscribeToDraftChanges: (onChange) => appAtomRegistry.subscribe(composerDraftsAtom, onChange),
selection: composerMenu.selection,
- onChangeDraftMessage: (text) => setComposerDraftText(composerDraftKey, text),