fix(desktop): stop empty dictation from send

Co-authored-by: Kenny Lopez <klopez4212@gmail.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
This commit is contained in:
John Tennant
2026-07-31 14:39:30 -04:00
co-authored by Kenny Lopez
parent bb0f1fa95a
commit 3057890dd6
2 changed files with 5 additions and 2 deletions
@@ -44,6 +44,7 @@ export function useMessageComposerDictation({
return {
...dictation,
canStopFromSend: isRecording || isStarting,
prepareToSubmit,
};
}
@@ -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,
],
);