mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 03:48:12 +03:00
Pause playback instead of reset when recording a new voice message
This commit is contained in:
parent
a73e707f33
commit
7349bc90c0
2 changed files with 2 additions and 10 deletions
|
@ -66,7 +66,7 @@ class AudioMessageHelper @Inject constructor(
|
|||
|
||||
fun startRecording(roomId: String) {
|
||||
stopPlayback()
|
||||
playbackTracker.makeAllPlaybacksIdle()
|
||||
playbackTracker.pauseAllPlaybacks()
|
||||
amplitudeList.clear()
|
||||
|
||||
try {
|
||||
|
|
|
@ -51,15 +51,7 @@ class AudioMessagePlaybackTracker @Inject constructor() {
|
|||
}
|
||||
|
||||
fun pauseAllPlaybacks() {
|
||||
listeners.keys.forEach { key ->
|
||||
pausePlayback(key)
|
||||
}
|
||||
}
|
||||
|
||||
fun makeAllPlaybacksIdle() {
|
||||
listeners.keys.forEach { key ->
|
||||
setState(key, Listener.State.Idle)
|
||||
}
|
||||
listeners.keys.forEach(::pausePlayback)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue