Skip to content

Commit

Permalink
Confine PDFThumbnailsViewController datasource updates (#1077)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvasilak authored Feb 24, 2025
1 parent 65df21b commit bf344b2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,13 @@ class PDFThumbnailsViewController: UICollectionViewController {
guard snapshot.numberOfSections > 0 else { return }

if state.changes.contains(.appearance) || state.changes.contains(.reload) {
updateQueue.sync { [weak self] in
updateQueue.async { [weak self] in
guard let self else { return }
var snapshot = dataSource.snapshot()
snapshot.reconfigureItems(snapshot.itemIdentifiers)
dataSource.apply(snapshot, animatingDifferences: false, completion: nil)
}
return
}

if state.changes.contains(.scrollToSelection) {
Expand Down

0 comments on commit bf344b2

Please sign in to comment.