Skip to content

Commit

Permalink
Merge pull request #21 from spoonconsulting/fix-image-picker-bug
Browse files Browse the repository at this point in the history
Fix image picker bug
  • Loading branch information
parveshneedhoo authored May 27, 2024
2 parents 9238acc + 3b3375e commit 8deb964
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## [2.1.1](https://github.com/spoonconsulting/cordova-plugin-telerik-imagepicker/compare/2.0.5...2.1.1) (2024-05-21)
## [2.1.2](https://github.com/spoonconsulting/cordova-plugin-telerik-imagepicker/compare/2.1.1...2.1.2) (2024-05-27)

* **ios:** Bug Fix.

## [2.1.1](https://github.com/spoonconsulting/cordova-plugin-telerik-imagepicker/compare/2.1.0...2.1.1) (2024-05-21)

* **ios:** Added a method `closeImagePicker` to close the image picker on ios devices.

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@spoonconsulting/cordova-plugin-telerik-imagepicker",
"version": "2.1.1",
"version": "2.1.2",
"cordova_name": "ImagePicker",
"description": "This plugin allows selection of multiple images from the camera roll / gallery in a phonegap app",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="@spoonconsulting/cordova-plugin-telerik-imagepicker"
version="2.1.1">
version="2.1.2">

<name>ImagePicker</name>

Expand Down
1 change: 0 additions & 1 deletion src/ios/SOSPicker.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,5 @@
@property (nonatomic, assign) NSInteger height;
@property (nonatomic, assign) NSInteger quality;
@property (nonatomic, assign) NSInteger outputType;
@property (nonatomic, assign) GMImagePickerController* imagePicker;

@end
5 changes: 2 additions & 3 deletions src/ios/SOSPicker.m
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ - (void)launchGMImagePicker:(bool)allow_video title:(NSString *)title message:(N
picker.colsInPortrait = 4;
picker.colsInLandscape = 6;
picker.minimumInteritemSpacing = 2.0;
self.imagePicker = picker;

if(!disable_popover) {
picker.modalPresentationStyle = UIModalPresentationPopover;
Expand Down Expand Up @@ -283,8 +282,8 @@ -(void)assetsPickerControllerDidCancel:(GMImagePickerController *)picker

- (void) closeImagePicker:(CDVInvokedUrlCommand *)command {
bool boolMessage = FALSE;
if (self.imagePicker && self.imagePicker.presentingViewController) {
[self.imagePicker.presentingViewController dismissViewControllerAnimated:YES completion:nil];
if (self.viewController != nil) {
[self.viewController dismissViewControllerAnimated:YES completion:nil];
boolMessage = TRUE;
}
CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:boolMessage];
Expand Down

0 comments on commit 8deb964

Please sign in to comment.