mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-09-19 16:24:41 +01:00
Keep the voice recording UI visible while recording is in progress.
This commit is contained in:
committed by
Greyson Parrelli
parent
56d64b24ff
commit
7804fbe528
@@ -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;
|
||||
|
||||
+2
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user