This repository was archived by the owner on Jun 19, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +22
-8
lines changed Expand file tree Collapse file tree 4 files changed +22
-8
lines changed Original file line number Diff line number Diff line change @@ -46,10 +46,20 @@ _None._
4646
4747### Internal Changes
4848
49- - Add this changelog file [ # 396 ]
49+ _ None. _
5050
5151_ Versions below this precede the Keep a Changelog-inspired formatting._
5252
53+ ## [ 1.8.6] ( https://github.com/wordpress-mobile/MediaPicker-iOS/releases/tag/1.8.6 )
54+
55+ ### Bug Fixes
56+
57+ - Fix a crash that happens during an incremental update to a large media library. [ #398 ]
58+
59+ ### Internal Changes
60+
61+ - Add this changelog file [ #396 ]
62+
5363---
5464## [ 1.8.5] ( https://github.com/wordpress-mobile/MediaPicker-iOS/releases/tag/1.8.5 )
5565### Changes
Original file line number Diff line number Diff line change 11PODS:
2- - WPMediaPicker (1.8.5 )
2+ - WPMediaPicker (1.8.6 )
33
44DEPENDENCIES:
55 - WPMediaPicker (from `../`)
@@ -9,7 +9,7 @@ EXTERNAL SOURCES:
99 :path: "../"
1010
1111SPEC CHECKSUMS:
12- WPMediaPicker: 5a74a91e11c1047e942a65de0193f93432fc2c6d
12+ WPMediaPicker: 749ebfa75fb2b6df4f5e5d9d0847e9512ad74d28
1313
1414PODFILE CHECKSUM: 31590cb12765a73c9da27d6ea5b8b127c095d71d
1515
Original file line number Diff line number Diff line change @@ -688,9 +688,6 @@ - (void)updateDataWithRemoved:(NSIndexSet *)removed inserted:(NSIndexSet *)inser
688688 if ([inserted count ] > 0 ) {
689689 [self .collectionView insertItemsAtIndexPaths: [self indexPathsFromIndexSet: inserted section: 0 ]];
690690 }
691- if ([changed count ] > 0 ) {
692- [self .collectionView reloadItemsAtIndexPaths: [self indexPathsFromIndexSet: changed section: 0 ]];
693- }
694691 for (id <WPMediaMove> move in moves) {
695692 [self .collectionView moveItemAtIndexPath: [NSIndexPath indexPathForItem: [move from ] inSection: 0 ]
696693 toIndexPath: [NSIndexPath indexPathForItem: [move to ] inSection: 0 ]];
@@ -699,8 +696,15 @@ - (void)updateDataWithRemoved:(NSIndexSet *)removed inserted:(NSIndexSet *)inser
699696 }
700697 }
701698 } completion: ^(BOOL finished) {
699+ if (weakSelf == nil ) {
700+ return ;
701+ }
702702 [weakSelf refreshSelection ];
703- [weakSelf.collectionView reloadItemsAtIndexPaths: weakSelf.collectionView.indexPathsForSelectedItems];
703+ // Reloading the changed items here rather than in the batch update block above to fix this issue:
704+ // https://github.com/wordpress-mobile/WordPress-iOS/issues/19505
705+ NSMutableSet <NSIndexPath *> *indexPaths = [NSMutableSet setWithArray: [weakSelf indexPathsFromIndexSet: changed section: 0 ]];
706+ [indexPaths addObjectsFromArray: weakSelf.collectionView.indexPathsForSelectedItems];
707+ [weakSelf.collectionView reloadItemsAtIndexPaths: [indexPaths allObjects ]];
704708 }];
705709
706710}
Original file line number Diff line number Diff line change 22
33Pod ::Spec . new do |s |
44 s . name = 'WPMediaPicker'
5- s . version = '1.8.5 '
5+ s . version = '1.8.6 '
66
77 s . summary = 'WPMediaPicker is an iOS controller that allows capture and picking of media assets.'
88 s . description = <<-DESC
You can’t perform that action at this time.
0 commit comments