perf: shortcircuit scrollingImageView

This commit is contained in:
2026-07-14 00:10:36 +02:00
parent 9baba413d3
commit 554a4022c9
+2
View File
@@ -1421,6 +1421,7 @@ extension ViewController: UICollectionViewDataSource, UICollectionViewDelegateFl
withReuseIdentifier: "ScrollingImageCell", for: indexPath
)
as! ScrollingImageCell
if mode != .scroll { return cell }
if metadata == nil {
print("metadata is nil, should probably not be the case")
return cell
@@ -1599,6 +1600,7 @@ class ImageLoader {
}
if let completion = completion {
assert(loadingTasks[key] == nil)
loadingTasks[key] = completion
}
if let existing = activeTokens[key], !existing.isCancelled {