diff --git a/damus/Components/ImageCarousel.swift b/damus/Components/ImageCarousel.swift index 72de487c..88d587d7 100644 --- a/damus/Components/ImageCarousel.swift +++ b/damus/Components/ImageCarousel.swift @@ -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 { diff --git a/damus/Util/EventCache.swift b/damus/Util/EventCache.swift index b7acc45a..1b53326e 100644 --- a/damus/Util/EventCache.swift +++ b/damus/Util/EventCache.swift @@ -25,6 +25,7 @@ enum ImageMetaProcessState { case processing case failed case processed(UIImage) + case not_needed var img: UIImage? { switch self {