Guard against race condition when loading card image

This commit is contained in:
Shadowfacts 2022-12-26 11:27:58 -05:00
parent 16cd045588
commit 24b3fa1e3f
1 changed files with 1 additions and 0 deletions

View File

@ -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
}