-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix handling of deleted photos on iOS (#1556)
* Fix crash on iOS when images are deleted Fixes a crash on iOS when a displayed image is deleted in the background: NSInternalInconsistencyException reason: 'attempt to delete and reload the same index path <snip>' According to https://developer.apple.com/documentation/photokit/phfetchresultchangedetails?language=objc ...changedIndexes can't be used safely inside performBatchUpdates:completion: Instead, use changedIndexes after and outside the performBatchUpdates:completion: call... * Update selection when assets are removed from collection If a selected photo is deleted from the photo library, it needs to be removed from `selectedAssets` or the UI will hang when the user taps "Done". Also, the UI needs to be updated to reflect the new selection. * Update counts in footer when collection changes When the number of photos or videos in the collection changes, update the footer to reflect the new counts.
- Loading branch information
Showing
1 changed file
with
89 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters