mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-19 03:42:52 +08:00
CB-7558 - hasPendingOperation flag in Camera plugin's takePicture should be reversed to fix memory errors
Signed-off-by: Shazron Abdullah <shazron@apache.org>
This commit is contained in:
parent
43cb385f0e
commit
513bfde49e
@ -82,7 +82,7 @@ static NSSet* org_apache_cordova_validArrowDirections;
|
|||||||
NSString* callbackId = command.callbackId;
|
NSString* callbackId = command.callbackId;
|
||||||
NSArray* arguments = command.arguments;
|
NSArray* arguments = command.arguments;
|
||||||
|
|
||||||
self.hasPendingOperation = NO;
|
self.hasPendingOperation = YES;
|
||||||
|
|
||||||
NSString* sourceTypeString = [arguments objectAtIndex:2];
|
NSString* sourceTypeString = [arguments objectAtIndex:2];
|
||||||
UIImagePickerControllerSourceType sourceType = UIImagePickerControllerSourceTypeCamera; // default
|
UIImagePickerControllerSourceType sourceType = UIImagePickerControllerSourceTypeCamera; // default
|
||||||
@ -161,7 +161,7 @@ static NSSet* org_apache_cordova_validArrowDirections;
|
|||||||
} else {
|
} else {
|
||||||
[self.viewController presentViewController:cameraPicker animated:YES completion:nil];
|
[self.viewController presentViewController:cameraPicker animated:YES completion:nil];
|
||||||
}
|
}
|
||||||
self.hasPendingOperation = YES;
|
self.hasPendingOperation = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)repositionPopover:(CDVInvokedUrlCommand*)command
|
- (void)repositionPopover:(CDVInvokedUrlCommand*)command
|
||||||
|
Loading…
Reference in New Issue
Block a user