Skip to content

Commit 84816c3

Browse files
authored
Merge pull request #451 from mindbox-cloud/release/2.8.6
Release/2.8.6
2 parents 1928e62 + 88f6db9 commit 84816c3

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ android.enableJetifier=true
2121
kotlin.code.style=official
2222

2323
# SDK version property
24-
SDK_VERSION_NAME=2.8.5
24+
SDK_VERSION_NAME=2.8.6

sdk/src/main/java/cloud/mindbox/mobile_sdk/Mindbox.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ object Mindbox : MindboxLog {
9292

9393
private val mutex = Mutex()
9494

95+
private val inAppMutex = Mutex()
96+
9597
private var firstInitCall: Boolean = true
9698

9799
/**
@@ -516,7 +518,7 @@ object Mindbox : MindboxLog {
516518
if (activity != null && lifecycleManager.isCurrentActivityResumed) {
517519
inAppMessageManager.registerCurrentActivity(activity)
518520
mindboxScope.launch {
519-
mutex.withLock {
521+
inAppMutex.withLock {
520522
firstInitCall = false
521523
inAppMessageManager.listenEventAndInApp()
522524
inAppMessageManager.initLogs()
@@ -570,8 +572,8 @@ object Mindbox : MindboxLog {
570572
)
571573
if (firstInitCall) {
572574
mindboxScope.launch {
573-
mutex.withLock {
574-
InitializeLock.await(InitializeLock.State.SAVE_MINDBOX_CONFIG)
575+
InitializeLock.await(InitializeLock.State.SAVE_MINDBOX_CONFIG)
576+
inAppMutex.withLock {
575577
if (!firstInitCall) return@launch
576578
firstInitCall = false
577579
inAppMessageManager.listenEventAndInApp()

0 commit comments

Comments
 (0)