mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +00:00
Fix the LoadableImage not using the already loaded image from the in-memory cache
This commit is contained in:
parent
59314cd3c0
commit
2a64453e80
@ -130,16 +130,13 @@ private class ContentLoader: ObservableObject {
|
||||
return cachedContent
|
||||
}
|
||||
|
||||
if let image = imageProvider?.imageFromSource(mediaSource) {
|
||||
let isGIF = mediaSource.mimeType == "image/gif"
|
||||
|
||||
if isGIF {
|
||||
if let data = image.kf.data(format: .GIF) {
|
||||
return .gifData(data)
|
||||
}
|
||||
} else {
|
||||
return .image(image)
|
||||
if isGIF {
|
||||
if let image = imageProvider?.imageFromSource(mediaSource),
|
||||
let data = image.kf.data(format: .GIF) {
|
||||
return .gifData(data)
|
||||
}
|
||||
} else if let image = imageProvider?.imageFromSource(mediaSource, size: size) {
|
||||
return .image(image)
|
||||
}
|
||||
|
||||
return cachedContent
|
||||
|
Loading…
x
Reference in New Issue
Block a user