Skip to content

Commit

Permalink
try turning off autoplay
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmcl committed Jan 24, 2024
1 parent 5a357a7 commit 4522117
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Sources/KukaiCoreSwift/Services/MediaProxyService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 4522117

Please sign in to comment.