Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Don't retry IAM display if 410 is received from backend #2158

Merged
merged 3 commits into from
Aug 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Refactor synchronization lock
- Changed `synchronized(lock)` to `synchronized(messages)`
  • Loading branch information
jennantilla committed Aug 2, 2024
commit 5f5c4c0a646fb4d143bc91f2a850512d7d9060cf
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ internal class InAppMessagesManager(
private val fetchIAMMutex = Mutex()
private var lastTimeFetchedIAMs: Long? = null

private val lock = Any()

override var paused: Boolean
get() = _state.paused
set(value) {
Expand Down Expand Up @@ -269,7 +267,7 @@ internal class InAppMessagesManager(
Logging.debug("InAppMessagesManager.evaluateInAppMessages()")
val messagesToQueue = mutableListOf<InAppMessage>()

synchronized(lock) {
synchronized(messages) {
for (message in messages) {
if (_triggerController.evaluateMessageTriggers(message)) {
setDataForRedisplay(message)
Expand Down Expand Up @@ -466,7 +464,7 @@ internal class InAppMessagesManager(
newTriggersKeys: Collection<String>,
isNewTriggerAdded: Boolean,
) {
synchronized(lock) {
synchronized(messages) {
for (message in messages) {
val isMessageDisplayed = redisplayedInAppMessages.contains(message)
val isTriggerOnMessage =
Expand Down
Loading