From bb8af80826f66fe68ee4e48a3c688e328fe251cf Mon Sep 17 00:00:00 2001 From: Nora Trapp Date: Wed, 28 Apr 2021 17:33:11 -0700 Subject: [PATCH] Allow scrubbing while another track is playing --- .../ConversationView/CV/CVAudioPlayback.swift | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Signal/src/ViewControllers/ConversationView/CV/CVAudioPlayback.swift b/Signal/src/ViewControllers/ConversationView/CV/CVAudioPlayback.swift index 192f64762c..2b73ea3ad9 100644 --- a/Signal/src/ViewControllers/ConversationView/CV/CVAudioPlayback.swift +++ b/Signal/src/ViewControllers/ConversationView/CV/CVAudioPlayback.swift @@ -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