Skip to content

Commit

Permalink
Merge pull request #63 from maxbbb/fix/callbacks
Browse files Browse the repository at this point in the history
fix: ensure callbacks execute on cache hits by dispatching to main queue
  • Loading branch information
gtokman authored Nov 2, 2024
2 parents 9d9cf7a + 96813f6 commit 949f4c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ios/FasterImageViewManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}

Expand Down

0 comments on commit 949f4c7

Please sign in to comment.