From 45221176396601810ee5cd738d69299a5f76527e Mon Sep 17 00:00:00 2001 From: Simon McLoughlin Date: Wed, 24 Jan 2024 11:06:25 +0000 Subject: [PATCH] try turning off autoplay --- Sources/KukaiCoreSwift/Services/MediaProxyService.swift | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Sources/KukaiCoreSwift/Services/MediaProxyService.swift b/Sources/KukaiCoreSwift/Services/MediaProxyService.swift index 734d1b12..71df5a00 100644 --- a/Sources/KukaiCoreSwift/Services/MediaProxyService.swift +++ b/Sources/KukaiCoreSwift/Services/MediaProxyService.swift @@ -375,12 +375,11 @@ public class MediaProxyService: NSObject { imageView.image = fallback } - if image?.sd_isAnimated == true, let animatedImage = image as? SDAnimatedImage, let maxMemory = maxAnimatedImageSize, (image?.sd_memoryCost ?? 0) > maxMemory { - imageView.image = animatedImage.animatedImageFrame(at: 0) - } else { - imageView.image = image + if image?.sd_isAnimated == true, let maxMemory = maxAnimatedImageSize, (image?.sd_memoryCost ?? 0) > maxMemory, let animatedImageView = imageView as? SDAnimatedImageView { + animatedImageView.autoPlayAnimatedImage = false } - + + imageView.image = image completion?(image?.size) } }