diff --git a/vector/src/main/java/im/vector/app/features/voicebroadcast/recording/VoiceBroadcastRecorderQ.kt b/vector/src/main/java/im/vector/app/features/voicebroadcast/recording/VoiceBroadcastRecorderQ.kt index 7ca6ab3c9c..5af3b2f05b 100644 --- a/vector/src/main/java/im/vector/app/features/voicebroadcast/recording/VoiceBroadcastRecorderQ.kt +++ b/vector/src/main/java/im/vector/app/features/voicebroadcast/recording/VoiceBroadcastRecorderQ.kt @@ -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) {