Skip to content

Commit

Permalink
Merge pull request #359 from wordpress-mobile/release/1.7.1
Browse files Browse the repository at this point in the history
Release/1.7.1
  • Loading branch information
loremattei authored Aug 10, 2020
2 parents 3391a69 + 5907379 commit cb4860d
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 10 deletions.
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
`WPMediaPicker` adheres to [Semantic Versioning](http://semver.org/).

#### Releases
- `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)
Expand All @@ -28,12 +29,19 @@ All notable changes to this project will be documented in this file.
- `0.15` Releases - [0.15](#15)

---
## [1.6.0](https://github.com/wordpress-mobile/MediaPicker-iOS/releases/tag/1.6.0)
Released on 2019-10-18. All issues associated with this milestone can be found using this [filter](https://github.com/wordpress-mobile/MediaPicker-iOS/pulls?utf8=✓&q=is%3Apr%20is%3Aclosed%20milestone%3A1.6.0).
## [1.7.0](https://github.com/wordpress-mobile/MediaPicker-iOS/releases/tag/1.7.0)
Released on 2019-10-18. All issues associated with this milestone can be found using this [filter](https://github.com/wordpress-mobile/MediaPicker-iOS/pulls?utf8=✓&q=is%3Apr%20is%3Aclosed%20milestone%3A1.7.0).

### Changes
- Fix image/photo capture when it's done with the device rotated. #337 #338

---
## [1.6.0](https://github.com/wordpress-mobile/MediaPicker-iOS/releases/tag/1.6.0)
Released on 2019-10-18. All issues associated with this milestone can be found using this [filter](https://github.com/wordpress-mobile/MediaPicker-iOS/pulls?utf8=✓&q=is%3Apr%20is%3Aclosed%20milestone%3A1.6.0).

### Fixed
- Fix bug where VC present after selection was being changed by selection updates. #353

---
## [1.5.0](https://github.com/wordpress-mobile/MediaPicker-iOS/releases/tag/1.5.0)
Released on 2019-09-09. All issues associated with this milestone can be found using this [filter](https://github.com/wordpress-mobile/MediaPicker-iOS/pulls?utf8=✓&q=is%3Apr%20is%3Aclosed%20milestone%3A1.5.0).
Expand Down
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- WPMediaPicker (1.6.1-beta.1)
- WPMediaPicker (1.7.1-beta.1)

DEPENDENCIES:
- WPMediaPicker (from `../`)
Expand All @@ -9,7 +9,7 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
WPMediaPicker: 370b1c1597afc0dd3664c361748fdfd13530d4c6
WPMediaPicker: 1b770d4d4f14fbfb7c421c53c761a521fc23bf12

PODFILE CHECKSUM: 6b0e391139d3864c72fde997a1418dbfe9bf5126

Expand Down
3 changes: 2 additions & 1 deletion Example/WPMediaPicker/SampleCellOverlayView.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#import <Foundation/Foundation.h>
#import <WPMediaPicker/WPMediaPicker.h>

@interface SampleCellOverlayView : UIView
@interface SampleCellOverlayView : UIView<ReusableOverlayView>

@property (nonatomic, copy) NSString *labelText;

Expand Down
5 changes: 5 additions & 0 deletions Example/WPMediaPicker/SampleCellOverlayView.m
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,9 @@ - (NSString *)labelText
return self.label.text;
}

- (void)prepareForReuse
{
self.label.text = nil;
}

@end
8 changes: 8 additions & 0 deletions Pod/Classes/WPMediaCollectionViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,11 @@

@end

@protocol ReusableOverlayView <NSObject>

@optional

- (void)prepareForReuse;

@end

4 changes: 4 additions & 0 deletions Pod/Classes/WPMediaCollectionViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ - (void)prepareForReuse
self.documentNameLabel.text = nil;

self.overlayView.hidden = YES;
if ( [self.overlayView respondsToSelector:@selector(prepareForReuse)]) {
id<ReusableOverlayView> reuse = (id<ReusableOverlayView>)self.overlayView;
[reuse prepareForReuse];
}
}

- (void)layoutSubviews {
Expand Down
1 change: 0 additions & 1 deletion Pod/Classes/WPMediaPickerViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,4 +357,3 @@
- (void)hideSearchBar;

@end

5 changes: 3 additions & 2 deletions Pod/Classes/WPMediaPickerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,7 @@ - (void)updateDataWithRemoved:(NSIndexSet *)removed inserted:(NSIndexSet *)inser
if ([removed containsIndex:self.assetIndexInPreview.item]){
self.assetIndexInPreview = nil;
}
__weak __typeof__(self) weakSelf = self;
[self.collectionView performBatchUpdates:^{
if (removed) {
[self.collectionView deleteItemsAtIndexPaths:[self indexPathsFromIndexSet:removed section:0]];
Expand All @@ -684,8 +685,8 @@ - (void)updateDataWithRemoved:(NSIndexSet *)removed inserted:(NSIndexSet *)inser
}
}
} completion:^(BOOL finished) {
[self refreshSelection];
[self.collectionView reloadItemsAtIndexPaths:self.collectionView.indexPathsForSelectedItems];
[weakSelf refreshSelection];
[weakSelf.collectionView reloadItemsAtIndexPaths:weakSelf.collectionView.indexPathsForSelectedItems];
}];

}
Expand Down
5 changes: 5 additions & 0 deletions Pod/Classes/WPNavigationMediaPickerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ @interface WPNavigationMediaPickerViewController () <
@property (nonatomic, strong) WPMediaPickerViewController *mediaPicker;
@property (nonatomic, strong) WPMediaGroupPickerViewController *groupViewController;
@property (nonatomic, strong) NSObject *changesObserver;
@property (nonatomic, weak) UIViewController *afterSelectionViewController;
@end

@implementation WPNavigationMediaPickerViewController
Expand Down Expand Up @@ -359,6 +360,9 @@ - (BOOL)mediaPickerController:(nonnull WPMediaPickerViewController *)picker hand
}

- (void)updateSelectionAction {
if (self.internalNavigationController.topViewController == self.afterSelectionViewController) {
return;
}
if (self.mediaPicker.options.showActionBar || self.mediaPicker.selectedAssets.count == 0 || !self.mediaPicker.options.allowMultipleSelection) {
self.internalNavigationController.topViewController.navigationItem.rightBarButtonItem = nil;
return;
Expand All @@ -382,6 +386,7 @@ - (void)navigationController:(UINavigationController *)navigationController will
- (void)showAfterViewController:(UIViewController *)viewController
{
NSParameterAssert(viewController);
self.afterSelectionViewController = viewController;
[self.internalNavigationController pushViewController:viewController animated:YES];
}

Expand Down
4 changes: 3 additions & 1 deletion Pod/Classes/WPPHAssetDataSource.m
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,9 @@ - (NSIndexSet *)adjustedIndexesForIndexSet:(NSIndexSet *)indexes forCount:(NSInt
{
NSMutableIndexSet *adjustedSet = [NSMutableIndexSet new];
[indexes enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop) {
[adjustedSet addIndex:[self adjustedIndexForIndex:idx forCount: count]];
if (idx != NSNotFound) {
[adjustedSet addIndex:[self adjustedIndexForIndex:idx forCount: count]];
}
}];

// Returns a non-mutable copy.
Expand Down
2 changes: 1 addition & 1 deletion WPMediaPicker.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "WPMediaPicker"
s.version = "1.6.1"
s.version = "1.7.1"
s.summary = "WPMediaPicker is an iOS controller that allows capture and picking of media assets."
s.description = <<-DESC
WPMediaPicker is an iOS controller that allows capture and picking of media assets.
Expand Down

0 comments on commit cb4860d

Please sign in to comment.