Allow scrubbing while another track is playing

This commit is contained in:
Nora Trapp 2021-04-28 17:33:11 -07:00
parent 112e84aaa1
commit bb8af80826

View File

@ -109,12 +109,10 @@ public class CVAudioPlayer: NSObject {
forAttachmentStream attachmentStream: TSAttachmentStream) {
AssertIsOnMainThread()
guard let audioPlayback = ensurePlayback(forAttachmentStream: attachmentStream) else {
owsFailDebug("Could not play audio attachment.")
return
}
progressCache[attachmentStream.uniqueId] = progress
audioPlayback.setProgress(progress)
if let audioPlayback = audioPlayback, audioPlayback.attachmentId == attachmentStream.uniqueId {
audioPlayback.setProgress(progress)
}
}
@objc