From 503d9aa7ea436d03e41d5af1edc5052b245ea141 Mon Sep 17 00:00:00 2001 From: Tibor Kaputa Date: Wed, 26 Apr 2023 23:04:15 +0200 Subject: [PATCH] small code simplifying --- .../voicerecorder/fragments/RecorderFragment.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/voicerecorder/fragments/RecorderFragment.kt b/app/src/main/kotlin/com/simplemobiletools/voicerecorder/fragments/RecorderFragment.kt index fa45944..cf19497 100644 --- a/app/src/main/kotlin/com/simplemobiletools/voicerecorder/fragments/RecorderFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/voicerecorder/fragments/RecorderFragment.kt @@ -141,12 +141,11 @@ class RecorderFragment(context: Context, attributeSet: AttributeSet) : MyViewPag private fun refreshView() { toggle_recording_button.setImageDrawable(getToggleButtonIcon()) toggle_pause_button.beVisibleIf(status != RECORDING_STOPPED && isNougatPlus()) + pauseBlinkTimer.cancel() + if (status == RECORDING_PAUSED) { - pauseBlinkTimer.cancel() pauseBlinkTimer = Timer() pauseBlinkTimer.scheduleAtFixedRate(getPauseBlinkTask(), 500, 500) - } else { - pauseBlinkTimer.cancel() } if (status == RECORDING_RUNNING) {