Fix blurhash appearing behind loaded images when swiping on carousel
Changelog-Fixed: Fixed blurhash appearing behind loaded images when swiping on carousel
This commit is contained in:
@@ -131,6 +131,10 @@ struct ImageCarousel: View {
|
||||
}
|
||||
.imageFill(for: geo.size, max: maxHeight, fill: fillHeight) { fill in
|
||||
state.previews.cache_image_meta(evid: evid, image_fill: fill)
|
||||
// blur hash can be discarded when we have the url
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
|
||||
state.events.lookup_img_metadata(url: url)?.state = .not_needed
|
||||
}
|
||||
image_fill = fill
|
||||
}
|
||||
.background {
|
||||
|
||||
@@ -25,6 +25,7 @@ enum ImageMetaProcessState {
|
||||
case processing
|
||||
case failed
|
||||
case processed(UIImage)
|
||||
case not_needed
|
||||
|
||||
var img: UIImage? {
|
||||
switch self {
|
||||
|
||||
Reference in New Issue
Block a user