Remove useless code since CountUpTimer notify on pause and stop

This commit is contained in:
Florian Renaud 2023-01-30 14:26:34 +01:00
parent ecc0cb5f0b
commit 3ce757ee4b
1 changed files with 4 additions and 14 deletions

View File

@ -248,31 +248,21 @@ class VoiceBroadcastRecorderQ(
recordingTicker = CountUpTimer().apply { recordingTicker = CountUpTimer().apply {
tickListener = CountUpTimer.TickListener { onTick(elapsedTime()) } tickListener = CountUpTimer.TickListener { onTick(elapsedTime()) }
resume() resume()
onTick(elapsedTime())
} }
} }
fun pause() { fun pause() {
recordingTicker?.apply { recordingTicker?.pause()
pause()
onTick(elapsedTime())
}
} }
fun resume() { fun resume() {
recordingTicker?.apply { recordingTicker?.resume()
resume()
onTick(elapsedTime())
}
} }
fun stop() { fun stop() {
recordingTicker?.apply { recordingTicker?.stop()
stop()
onTick(elapsedTime())
recordingTicker = null recordingTicker = null
} }
}
private fun onTick(elapsedTimeMillis: Long) { private fun onTick(elapsedTimeMillis: Long) {
onElapsedTimeUpdated(elapsedTimeMillis) onElapsedTimeUpdated(elapsedTimeMillis)