From 4c41e94f8d89633c0462808ccfe6581dc150b28f Mon Sep 17 00:00:00 2001 From: CMK Date: Tue, 15 Feb 2022 20:12:53 +0800 Subject: [PATCH] fix: blurhash image not display during image loading issue --- MastodonSDK/Sources/MastodonUI/View/Content/MediaView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MastodonSDK/Sources/MastodonUI/View/Content/MediaView.swift b/MastodonSDK/Sources/MastodonUI/View/Content/MediaView.swift index f4231f02c..3b4d249ef 100644 --- a/MastodonSDK/Sources/MastodonUI/View/Content/MediaView.swift +++ b/MastodonSDK/Sources/MastodonUI/View/Content/MediaView.swift @@ -154,7 +154,7 @@ extension MediaView { .receive(on: DispatchQueue.main) .sink { [weak self] isReveal, previewImage, blurhashImage in guard let self = self else { return } - let image = isReveal ? previewImage : blurhashImage + let image = isReveal ? (previewImage ?? blurhashImage) : blurhashImage self.imageView.image = image } .store(in: &configuration.disposeBag)