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,30 +248,20 @@ class VoiceBroadcastRecorderQ(
recordingTicker = CountUpTimer().apply {
tickListener = CountUpTimer.TickListener { onTick(elapsedTime()) }
resume()
onTick(elapsedTime())
}
}
fun pause() {
recordingTicker?.apply {
pause()
onTick(elapsedTime())
}
recordingTicker?.pause()
}
fun resume() {
recordingTicker?.apply {
resume()
onTick(elapsedTime())
}
recordingTicker?.resume()
}
fun stop() {
recordingTicker?.apply {
stop()
onTick(elapsedTime())
recordingTicker = null
}
recordingTicker?.stop()
recordingTicker = null
}
private fun onTick(elapsedTimeMillis: Long) {