File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Leanplum-SDK/Classes/MessageTemplates/ViewControllers Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ +(void)presentOverVisible:(UIViewController *) viewController
1919 UIViewController *topViewController = [self visibleViewController ];
2020 // if topViewController is getting dismissed, get view controller that presented it and let it present our new view controller,
2121 // otherwise we can assume that our topViewController will be in view hierarchy when presenting new view controller
22- if (topViewController.beingDismissed ) {
22+ if (topViewController.isBeingDismissed ) {
2323 [[topViewController presentingViewController ] presentViewController: viewController animated: YES completion: nil ];
2424 } else {
2525 [topViewController presentViewController: viewController animated: YES completion: nil ];
@@ -31,9 +31,14 @@ +(void)dismissExisitingViewController:(nullable void (^)(void)) completion
3131{
3232 UIViewController *topViewController = [self visibleViewController ];
3333
34- // dismiss html view controller for now
34+ // Dismiss the view controller if another message will be presented (without user interaction)
35+ // Dismiss only html view controller for now
3536 if ([topViewController isKindOfClass: [LPWebInterstitialViewController class ]]) {
36- [topViewController dismissViewControllerAnimated: NO completion: completion];
37+ if (topViewController.isBeingDismissed ) {
38+ completion ();
39+ } else {
40+ [topViewController dismissViewControllerAnimated: NO completion: completion];
41+ }
3742 } else {
3843 completion ();
3944 }
You can’t perform that action at this time.
0 commit comments