Skip to content

Commit

Permalink
Pausing IAMs now dismisses any currently showing IAM
Browse files Browse the repository at this point in the history
Tested that queued IAMs don't show and that lifecycle callback listeners fire.
  • Loading branch information
emawby committed Sep 12, 2024
1 parent a197d9d commit 296ec63
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,13 @@ - (void)setInAppMessagingPaused:(BOOL)pause {
_isInAppMessagingPaused = pause;

// If IAM are not paused, try to evaluate and show IAMs
if (!pause)
if (!pause) {
[self evaluateMessages];
} else if (self.isInAppMessageShowing) {
dispatch_async(dispatch_get_main_queue(), ^{
[self.viewController dismissCurrentInAppMessage];
});
}
}

+ (BOOL)doesDeviceSupportIAM {
Expand Down

0 comments on commit 296ec63

Please sign in to comment.