Merge pull request #192 from Uniquely6958/master

Cancel existing blink requests when refreshing view (#191)
This commit is contained in:
Tibor Kaputa 2023-04-26 23:04:29 +02:00 committed by GitHub
commit f12f26a50c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -141,11 +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 = Timer()
pauseBlinkTimer.scheduleAtFixedRate(getPauseBlinkTask(), 500, 500)
} else {
pauseBlinkTimer.cancel()
}
if (status == RECORDING_RUNNING) {