Skip to content

Commit

Permalink
Release 7.3.2
Browse files Browse the repository at this point in the history
Release 7.3.2
  • Loading branch information
SpertsyanKM authored Apr 3, 2024
2 parents 96804b3 + 7bc7168 commit 40cd8d8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask
buildscript {
ext {
release = [
versionName: "7.3.1",
versionName: "7.3.2",
versionCode: 1
]
}
Expand Down
2 changes: 1 addition & 1 deletion fastlane/report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@



<testcase classname="fastlane.lanes" name="0: default_platform" time="0.000442">
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.000401">

</testcase>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,27 @@ internal class QRemoteConfigManager @Inject constructor(
var isInProgress: Boolean = false
)

internal class ListRequestData(
val callback: QonversionRemoteConfigListCallback,
val contextKeys: List<String>? = null,
val includeEmptyContextKey: Boolean = false
)

lateinit var userStateProvider: UserStateProvider
private var loadingStates = mutableMapOf<String?, LoadingState>()
private val listRequests = mutableListOf<ListRequestData>()

fun handlePendingRequests() {
loadingStates.filter { it.value.callbacks.isNotEmpty() }
.keys.forEach { contextKey -> loadRemoteConfig(contextKey, null) }

listRequests.forEach { requestData ->
requestData.contextKeys?.let {
loadRemoteConfigList(it, requestData.includeEmptyContextKey, requestData.callback)
} ?: run {
loadRemoteConfigList(requestData.callback)
}
}
}

fun userChangingRequestFailedWithError(error: QonversionError) {
Expand Down Expand Up @@ -86,6 +101,11 @@ internal class QRemoteConfigManager @Inject constructor(
return
}

if (!userStateProvider.isUserStable) {
listRequests.add(ListRequestData(callback, contextKeys, includeEmptyContextKey))
return
}

remoteConfigService.loadRemoteConfigs(
contextKeys,
includeEmptyContextKey,
Expand All @@ -94,6 +114,11 @@ internal class QRemoteConfigManager @Inject constructor(
}

fun loadRemoteConfigList(callback: QonversionRemoteConfigListCallback) {
if (!userStateProvider.isUserStable) {
listRequests.add(ListRequestData(callback))
return
}

remoteConfigService.loadRemoteConfigs(getRemoteConfigListCallbackWrapper(callback))
}

Expand Down

0 comments on commit 40cd8d8

Please sign in to comment.