Keep the voice recording UI visible while recording is in progress.

This commit is contained in:
Cody Henthorne
2026-09-15 18:26:05 -04:00
committed by Greyson Parrelli
parent 56d64b24ff
commit 7804fbe528
3 changed files with 10 additions and 1 deletions
@@ -741,6 +741,10 @@ public class InputPanel extends ConstraintLayout
return microphoneRecorderView.isRecordingLocked();
}
public boolean isRecordingInProgress() {
return microphoneRecorderView.isRecording();
}
public void releaseRecordingLockAndSend() {
microphoneRecorderView.unlockAction();
}
@@ -91,6 +91,10 @@ public final class MicrophoneRecorderView extends FrameLayout implements View.On
return state == State.RUNNING_LOCKED;
}
public boolean isRecording() {
return state != State.NOT_RUNNING;
}
private void lockAction() {
if (state == State.RUNNING_HELD) {
state = State.RUNNING_LOCKED;
@@ -2530,7 +2530,8 @@ class ConversationFragment :
inlineAttachment.hide(false)
}
draftViewModel.voiceNoteDraft != null -> {
// An in-progress recording snapshots itself into the draft, but its UI lives in quickAttachment and must stay visible.
draftViewModel.voiceNoteDraft != null && !inputPanel.isRecordingInProgress -> {
buttonToggle.display(sendButton)
quickAttachment.hide(true)
inlineAttachment.hide(true)