diff --git a/CHANGELOG.md b/CHANGELOG.md index c324c17..2e1c2cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,33 +2,10 @@ All notable changes to this project will be documented in this file. `WPMediaPicker` adheres to [Semantic Versioning](http://semver.org/). -#### Releases -- `1.8.1` Release - [1.8.1](#1.8.1) -- `1.8.0` Release - [1.8](#1.8.0) -- `1.7.0` Release - [1.7](#1.7.0) -- `1.6.0` Release - [1.6](#1.6.0) -- `1.5.0` Release - [1.5](#1.5.0) -- `1.4.2` Release - [1.4.2](#1.4.2) -- `1.4` Release - [1.4](#1.4) -- `1.3.4` Release - [1.3.4](#1.3.4) -- `1.3` Release - [1.3](#1.3) -- `1.2` Release - [1.2](#1.2) -- `1.1` Release - [1.1](#1.1) -- `1.0` Release - [1.0](#1.0) -- `0.28` Release - [0.28](#28) -- `0.27` Release - [0.27](#27) -- `0.26` Release - [0.26](#26) -- `0.25` Release - [0.25](#25) -- `0.24` Release - [0.24](#24) -- `0.23` Release - [0.23](#23) -- `0.22` Release - [0.22](#22) -- `0.21` Release - [0.21](#21) -- `0.20` Release - [0.20](#20) -- `0.19` Release - [0.19](#19) -- `0.18` Releases - [0.18](#18) -- `0.17` Releases - [0.17](#17) -- `0.16` Releases - [0.16](#16) -- `0.15` Releases - [0.15](#15) +--- +## [1.8.5](https://github.com/wordpress-mobile/MediaPicker-iOS/releases/tag/1.8.5) +### Changes +- Fix issue where incorrect thumbnails are displayed during incremental updates. --- ## [1.8.1](https://github.com/wordpress-mobile/MediaPicker-iOS/releases/tag/1.8.1) diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 7e1d4fa..047b1dc 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - WPMediaPicker (1.8.4) + - WPMediaPicker (1.8.5) DEPENDENCIES: - WPMediaPicker (from `../`) @@ -9,7 +9,7 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - WPMediaPicker: 9533160e5587939876aeeb1461a441a4e5dc4c4d + WPMediaPicker: 5a74a91e11c1047e942a65de0193f93432fc2c6d PODFILE CHECKSUM: 31590cb12765a73c9da27d6ea5b8b127c095d71d diff --git a/Pod/Classes/WPMediaPickerViewController.m b/Pod/Classes/WPMediaPickerViewController.m index 2a00ecc..d01186c 100644 --- a/Pod/Classes/WPMediaPickerViewController.m +++ b/Pod/Classes/WPMediaPickerViewController.m @@ -682,16 +682,14 @@ - (void)updateDataWithRemoved:(NSIndexSet *)removed inserted:(NSIndexSet *)inser } __weak __typeof__(self) weakSelf = self; [self.collectionView performBatchUpdates:^{ - if (removed) { + if ([removed count] > 0) { [self.collectionView deleteItemsAtIndexPaths:[self indexPathsFromIndexSet:removed section:0]]; } - if (inserted) { + if ([inserted count] > 0) { [self.collectionView insertItemsAtIndexPaths:[self indexPathsFromIndexSet:inserted section:0]]; } - NSArray *indexPaths = [self indexPathsFromIndexSet:changed section:0]; - for (NSIndexPath *indexPath in indexPaths) { - WPMediaCollectionViewCell *cell = (WPMediaCollectionViewCell *)[self.collectionView cellForItemAtIndexPath:indexPath]; - [self configureCell:cell forIndexPath:indexPath]; + if ([changed count] > 0) { + [self.collectionView reloadItemsAtIndexPaths:[self indexPathsFromIndexSet:changed section:0]]; } for (id move in moves) { [self.collectionView moveItemAtIndexPath:[NSIndexPath indexPathForItem:[move from] inSection:0] diff --git a/WPMediaPicker.podspec b/WPMediaPicker.podspec index 4294b94..664e3f8 100644 --- a/WPMediaPicker.podspec +++ b/WPMediaPicker.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |s| s.name = 'WPMediaPicker' - s.version = '1.8.4' + s.version = '1.8.5' s.summary = 'WPMediaPicker is an iOS controller that allows capture and picking of media assets.' s.description = <<-DESC