Skip to content

Fix image picker bug #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading