From 24b3fa1e3f3274c236aa7c2f8ffe5d9df2179082 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Mon, 26 Dec 2022 11:27:58 -0500 Subject: [PATCH] Guard against race condition when loading card image --- Tusker/Views/Status/StatusCardView.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Tusker/Views/Status/StatusCardView.swift b/Tusker/Views/Status/StatusCardView.swift index 5dcc84d9..96ee95f1 100644 --- a/Tusker/Views/Status/StatusCardView.swift +++ b/Tusker/Views/Status/StatusCardView.swift @@ -152,6 +152,7 @@ class StatusCardView: UIView { imageRequest = ImageCache.attachments.get(URL(imageURL)!, completion: { (_, image) in guard let image = image, + self.card?.image == imageURL, let transformedImage = ImageGrayscalifier.convertIfNecessary(url: URL(imageURL)!, image: image) else { return }