From 96813f666437458e5daf97cea5aab8b4e4dbec2e Mon Sep 17 00:00:00 2001 From: Kane Thomas Date: Wed, 23 Oct 2024 10:31:13 -0400 Subject: [PATCH] fix: ensure callbacks execute on cache hits by dispatching to main queue --- ios/FasterImageViewManager.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ios/FasterImageViewManager.swift b/ios/FasterImageViewManager.swift index a8dee30..f0bb5c0 100644 --- a/ios/FasterImageViewManager.swift +++ b/ios/FasterImageViewManager.swift @@ -74,7 +74,9 @@ final class FasterImageView: UIView { lazyImageView.pipeline = .shared lazyImageView.priority = .high lazyImageView.onCompletion = { [weak self] result in - self?.completionHandler(with: result) + DispatchQueue.main.async { + self?.completionHandler(with: result) + } } }