diff --git a/app/src/main/java/net/devemperor/dictate/DictateInputMethodService.java b/app/src/main/java/net/devemperor/dictate/DictateInputMethodService.java index 46cdc70..77fd09d 100644 --- a/app/src/main/java/net/devemperor/dictate/DictateInputMethodService.java +++ b/app/src/main/java/net/devemperor/dictate/DictateInputMethodService.java @@ -141,6 +141,7 @@ public void run() { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) switchButton.setEnabled(false); settingsButton.setOnClickListener(v -> { + if (isRecording) stopButton.performClick(); infoCl.setVisibility(View.GONE); openSettingsActivity(); }); @@ -234,8 +235,6 @@ public void run() { isRecording = false; recordButton.setText(R.string.dictate_record); recordButton.setIcon(AppCompatResources.getDrawable(this, R.drawable.ic_baseline_mic_24)); - settingsButton.setEnabled(true); - switchButton.setEnabled(true); recordButton.setEnabled(true); pauseButton.setVisibility(View.GONE); stopButton.setVisibility(View.GONE); @@ -304,8 +303,6 @@ private void startRecording() { recordButton.setText(R.string.dictate_send); recordButton.setIcon(AppCompatResources.getDrawable(this, R.drawable.ic_baseline_send_24)); - settingsButton.setEnabled(false); - switchButton.setEnabled(false); pauseButton.setVisibility(View.VISIBLE); stopButton.setVisibility(View.VISIBLE); isRecording = true; @@ -405,8 +402,6 @@ private void stopRecording() { mainHandler.post(() -> { recordButton.setText(R.string.dictate_record); recordButton.setIcon(AppCompatResources.getDrawable(this, R.drawable.ic_baseline_mic_24)); - settingsButton.setEnabled(true); - switchButton.setEnabled(true); recordButton.setEnabled(true); }); });