Skip to content

Keep dictated text when stopping, and send it in one tap - #1

Open
koutsovt wants to merge 1 commit into
KenKaiii:mainfrom
koutsovt:fix/dictation-erase-and-one-tap
Open

koutsovt wants to merge 1 commit into
KenKaiii:mainfrom
koutsovt:fix/dictation-erase-and-one-tap

Conversation

@koutsovt

@koutsovt koutsovt commented Aug 5, 2026

Copy link
Copy Markdown

Tapping the mic to stop dictation erased the message: iOS fires a final result with an empty transcript on stop(), and applyTranscript treats an empty transcript as a reset to the pre-dictation draft. The interim results had already landed the real words, so the empty final could only erase them. Drop empty transcripts in the dictation handler, where the draft is known, rather than in the pure merge rule.

With that fixed, wire the send arrow to appear while still dictating: it now shows as soon as the draft is non-empty, and tapping it cancels the recogniser (releasing the mic) before sending. Speaking a message and sending it is one tap instead of stop-then-send.

Tapping the mic to stop dictation erased the message: iOS fires a final
`result` with an empty transcript on `stop()`, and `applyTranscript` treats
an empty transcript as a reset to the pre-dictation draft. The interim
results had already landed the real words, so the empty final could only
erase them. Drop empty transcripts in the dictation handler, where the
draft is known, rather than in the pure merge rule.

With that fixed, wire the send arrow to appear while still dictating: it
now shows as soon as the draft is non-empty, and tapping it cancels the
recogniser (releasing the mic) before sending. Speaking a message and
sending it is one tap instead of stop-then-send.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant