From abab40e96345df5af9484b219bf9846f2a4654d6 Mon Sep 17 00:00:00 2001 From: advait Date: Mon, 24 Apr 2023 19:28:35 +0530 Subject: [PATCH] cancel existing blink requests when refreshing --- .../voicerecorder/fragments/RecorderFragment.kt | 1 + 1 file changed, 1 insertion(+) 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 68a9f42..fa45944 100644 --- a/app/src/main/kotlin/com/simplemobiletools/voicerecorder/fragments/RecorderFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/voicerecorder/fragments/RecorderFragment.kt @@ -142,6 +142,7 @@ class RecorderFragment(context: Context, attributeSet: AttributeSet) : MyViewPag toggle_recording_button.setImageDrawable(getToggleButtonIcon()) toggle_pause_button.beVisibleIf(status != RECORDING_STOPPED && isNougatPlus()) if (status == RECORDING_PAUSED) { + pauseBlinkTimer.cancel() pauseBlinkTimer = Timer() pauseBlinkTimer.scheduleAtFixedRate(getPauseBlinkTask(), 500, 500) } else {