Skip to content

Commit

Permalink
IAM manager doesn't need to check for onFocus in addition to onSessio…
Browse files Browse the repository at this point in the history
…nStarted

* The onSessionStarted callback already will fetch messages.
* Now that session starting (including cold starts) should always trigger the subscribers, there is no need to also fetch messages within onFocus
  • Loading branch information
nan-li committed Jun 7, 2024
1 parent 233003b commit f85743e
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -881,15 +881,7 @@ internal class InAppMessagesManager(
.show()
}

private var onFocusCalled: Boolean = false

override fun onFocus() {
if (onFocusCalled) return
onFocusCalled = true
suspendifyOnThread {
fetchMessages()
}
}
override fun onFocus() { }

override fun onUnfocused() { }
}

0 comments on commit f85743e

Please sign in to comment.