Skip to content

Commit

Permalink
Merge pull request #1480 from OneSignal/feat/close_IAM_programatically
Browse files Browse the repository at this point in the history
Pausing IAMs dismisses any currently showing IAM
  • Loading branch information
emawby authored Sep 12, 2024
2 parents a197d9d + 296ec63 commit f8c8ee7
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 f8c8ee7

Please sign in to comment.