Skip to content

Commit

Permalink
Fixed datasource regression
Browse files Browse the repository at this point in the history
  • Loading branch information
michalrentka committed Feb 19, 2025
1 parent dd9701d commit f41d620
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ final class PDFAnnotationsViewController: UIViewController {

if state.changes.contains(.library) {
updateQueue.async { [weak self] in
guard let self else { return }
var snapshot = NSDiffableDataSourceSnapshot<Int, PDFReaderState.AnnotationKey>()
guard let self, !dataSource.snapshot().sectionIdentifiers.isEmpty else { return }
var snapshot = dataSource.snapshot()
snapshot.reloadSections([0])
dataSource.apply(snapshot, animatingDifferences: isVisible, completion: completion)
}
Expand Down

0 comments on commit f41d620

Please sign in to comment.