From 0c8134463ffeb9e6c939b34103606d0f2d3c4611 Mon Sep 17 00:00:00 2001 From: CMK Date: Thu, 8 Apr 2021 14:11:35 +0800 Subject: [PATCH] fix: audio pause condition logic issue --- .../StatusProvider/StatusProvider+UITableViewDelegate.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mastodon/Protocol/StatusProvider/StatusProvider+UITableViewDelegate.swift b/Mastodon/Protocol/StatusProvider/StatusProvider+UITableViewDelegate.swift index baaa708a..32915baf 100644 --- a/Mastodon/Protocol/StatusProvider/StatusProvider+UITableViewDelegate.swift +++ b/Mastodon/Protocol/StatusProvider/StatusProvider+UITableViewDelegate.swift @@ -95,7 +95,8 @@ extension StatusTableViewCellDelegate where Self: StatusProvider { videoPlayerViewModel.didEndDisplaying() } } - if let currentAudioAttachment = self.context.audioPlaybackService.attachment, let _ = status?.mediaAttachments?.contains(currentAudioAttachment) { + if let currentAudioAttachment = self.context.audioPlaybackService.attachment, + status?.mediaAttachments?.contains(currentAudioAttachment) == true { self.context.audioPlaybackService.pause() } }