From 7892aa90fdc0bf449c6ad549d1cffd4169109af3 Mon Sep 17 00:00:00 2001 From: Aleksi Lahikainen Date: Tue, 8 Sep 2020 13:41:11 +0300 Subject: [PATCH] Improve formatting --- src/ios/FileOpener2.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ios/FileOpener2.m b/src/ios/FileOpener2.m index dd86c8f..2553a8f 100644 --- a/src/ios/FileOpener2.m +++ b/src/ios/FileOpener2.m @@ -84,6 +84,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. //Opens the file preview CGRect rect; + if ([command.arguments count] >= 4) { NSArray *positionValues = [command.arguments objectAtIndex:3]; @@ -105,7 +106,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. wasOpened = [docController presentOpenInMenuFromRect:rect inView:cont.view animated:YES]; } - if(wasOpened) { + if (wasOpened) { pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString: @""]; } else { NSDictionary *jsonObj = [ [NSDictionary alloc] @@ -133,6 +134,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. while (presentingViewController.presentedViewController != nil && ![presentingViewController.presentedViewController isBeingDismissed]){ presentingViewController = presentingViewController.presentedViewController; } + return presentingViewController; } @end