Skip to content

Commit

Permalink
Merge pull request #362 from whrlgus/master
Browse files Browse the repository at this point in the history
fix NSInternalInconsistencyException crash
  • Loading branch information
mikaoj authored May 2, 2024
2 parents b5a77ac + afed816 commit 5925719
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Scene/Assets/AssetsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@ extension AssetsViewController: UICollectionViewDelegate {

extension AssetsViewController: PHPhotoLibraryChangeObserver {
func photoLibraryDidChange(_ changeInstance: PHChange) {
guard let changes = changeInstance.changeDetails(for: fetchResult) else { return }
// Since we are gonna update UI, make sure we are on main
DispatchQueue.main.async {
guard let changes = changeInstance.changeDetails(for: self.fetchResult) else { return }
if changes.hasIncrementalChanges {
self.collectionView.performBatchUpdates({
self.fetchResult = changes.fetchResultAfterChanges
Expand Down

0 comments on commit 5925719

Please sign in to comment.