Skip to content

Commit c6b2678

Browse files
nan-lijinliu9508
authored andcommitted
Read in dismissed IAMs on IAM Manager start
* The IAM Manager holds a list of IAMs that have been seen and dismissed by the user called `_dismissedMessages`. * We were not setting this list up, and this leads to bugs like displaying IAMs on app start that should not be displayed.
1 parent f856489 commit c6b2678

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

OneSignalSDK/onesignal/in-app-messages/src/main/java/com/onesignal/inAppMessages/internal/InAppMessagesManager.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ internal class InAppMessagesManager(
119119
}
120120

121121
override fun start() {
122+
val tempDismissedSet = _prefs.dismissedMessagesId
123+
if (tempDismissedSet != null)
124+
_dismissedMessages.addAll(tempDismissedSet)
125+
122126
val tempLastTimeInAppDismissed = _prefs.lastTimeInAppDismissed
123127
if (tempLastTimeInAppDismissed != null) {
124128
_state.lastTimeInAppDismissed = tempLastTimeInAppDismissed

0 commit comments

Comments
 (0)