Skip to content

Commit

Permalink
try extracting only the first frame
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmcl committed Jan 24, 2024
1 parent 4522117 commit a26adfd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Sources/KukaiCoreSwift/Services/MediaProxyService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -375,11 +375,13 @@ public class MediaProxyService: NSObject {
imageView.image = fallback
}

if image?.sd_isAnimated == true, let maxMemory = maxAnimatedImageSize, (image?.sd_memoryCost ?? 0) > maxMemory, let animatedImageView = imageView as? SDAnimatedImageView {
animatedImageView.autoPlayAnimatedImage = false
if image?.sd_isAnimated == true, let maxMemory = maxAnimatedImageSize, (image?.sd_memoryCost ?? 0) > maxMemory/*, let animatedImageView = imageView as? SDAnimatedImageView*/ /*let aniamtedImage = SDAnimatedImage*/ {
//animatedImageView.autoPlayAnimatedImage = false
imageView.image = image?.images?.first
} else {
imageView.image = image
}

imageView.image = image

completion?(image?.size)
}
}
Expand Down

0 comments on commit a26adfd

Please sign in to comment.