diff --git a/desktop/src/features/dictation/hooks/useMessageComposerDictation.tsx b/desktop/src/features/dictation/hooks/useMessageComposerDictation.tsx index 97252bf48..a6d5d4277 100644 --- a/desktop/src/features/dictation/hooks/useMessageComposerDictation.tsx +++ b/desktop/src/features/dictation/hooks/useMessageComposerDictation.tsx @@ -44,6 +44,7 @@ export function useMessageComposerDictation({ return { ...dictation, + canStopFromSend: isRecording || isStarting, prepareToSubmit, }; } diff --git a/desktop/src/features/messages/ui/MessageComposer.tsx b/desktop/src/features/messages/ui/MessageComposer.tsx index ecee420ab..1fbf8440d 100644 --- a/desktop/src/features/messages/ui/MessageComposer.tsx +++ b/desktop/src/features/messages/ui/MessageComposer.tsx @@ -518,7 +518,6 @@ function MessageComposerImpl({ // ── Submit message ────────────────────────────────────────────────── const submitMessage = React.useCallback(async () => { if (!prepareDictationSubmitRef.current()) return; - const trimmed = syncComposerContentFromEditor().trim(); // Edit mode @@ -838,13 +837,16 @@ function MessageComposerImpl({ disabled || media.isUploading || mentionSendFlow.isPreparingMentionSend || - (isContentEmpty && media.pendingImeta.length === 0), + (isContentEmpty && + media.pendingImeta.length === 0 && + !dictation.canStopFromSend), [ disabled, media.isUploading, mentionSendFlow.isPreparingMentionSend, isContentEmpty, media.pendingImeta.length, + dictation.canStopFromSend, ], );