Add pause/resume for locked voice message recording#6251
Draft
bmaximuml wants to merge 1 commit into
Draft
Conversation
When recording is locked (user swipes up on the mic button), a Pause button now appears alongside Cancel. Tapping it pauses the recording and changes the button to Resume; tapping again continues from the same point. The send button remains accessible while paused. AVAudioRecorder.pause()/record() handle the audio layer. The duration label freezes correctly while paused by tracking accumulated pause time separately from wall-clock elapsed time. Device sleep blocking is released on pause and re-acquired on resume, consistent with how the existing lock/unlock flow works. Closes https://community.signalusers.org/t/pause-while-recording-voice-message/3357 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First time contributor checklist
Contributor checklist
Description
Adds a Pause button to the locked voice message recording UI (the state entered after swiping up on the mic button). Requested by the community: https://community.signalusers.org/t/pause-while-recording-voice-message/3357
How it works:
AVAudioRecorder; the button label switches to "Resume"Implementation notes:
AVAudioRecorder.pause()/.record()handle the audio layer natively; no audio segments need to be stitched togetherAVAudioRecorder.currentTimecorrectly excludes paused periods, so the minimum-duration check and final file duration are accuratevoiceMemoPausedDurationis used to offset the elapsed-time calculation so the label picks up exactly where it left off.recordingPausedcase added toVoiceMemoRecordingState; all existing gesture-handler switch statements updated accordinglyFiles changed:
VoiceMessageInProgressDraft—isPaused,pauseRecording(),resumeRecording()ConversationInputToolbar—.recordingPausedstate, Pause/Resume button inlockVoiceMemoUI(), timer helpers, adjusted duration labelConversationViewController+VoiceMessage—pauseRecordingVoiceMessage(),resumeRecordingVoiceMessage()ConversationViewController+ConversationInputToolbarDelegate—voiceMemoGestureDidPause(),voiceMemoGestureDidResume()Localizable.strings— 4 new strings (Pause, Resume + accessibility labels)VoiceMessageInProgressDraftTest— unit tests for initial state and stop-before-start safety🤖 Generated with Claude Code