jcesarmobile closed pull request #98: CB-13555 (ios) Present notification view controller by inappbrowser view controller URL: https://github.com/apache/cordova-plugin-dialogs/pull/98
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/src/ios/CDVNotification.m b/src/ios/CDVNotification.m index 0dd3d2c..89f3d5d 100644 --- a/src/ios/CDVNotification.m +++ b/src/ios/CDVNotification.m @@ -228,8 +228,11 @@ - (void)beep:(CDVInvokedUrlCommand*)command -(UIViewController *)getTopPresentedViewController { UIViewController *presentingViewController = self.viewController; - while(presentingViewController.presentedViewController != nil && ![presentingViewController.presentedViewController isBeingDismissed]) - { + if (presentingViewController.view.window != [UIApplication sharedApplication].keyWindow){ + presentingViewController = [UIApplication sharedApplication].keyWindow.rootViewController; + } + + while (presentingViewController.presentedViewController != nil && ![presentingViewController.presentedViewController isBeingDismissed]){ presentingViewController = presentingViewController.presentedViewController; } return presentingViewController; ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org