Skip to content

Commit

Permalink
Release 7.1.0
Browse files Browse the repository at this point in the history
Release 7.1.0
  • Loading branch information
SpertsyanKM authored Jan 30, 2024
2 parents 66174bb + cfbe686 commit 3dad614
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 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.0.0",
versionName: "7.1.0",
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.011869">
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.019863">

</testcase>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ enum class QUserPropertyKey(val userPropertyCode: String) {
FirebaseAppInstanceId("_q_firebase_instance_id"),
AppSetId("_q_app_set_id"),
AdvertisingId("_q_advertising_id"), // iOS only
AppMetricaDeviceId("_q_appmetrica_device_id"),
AppMetricaUserProfileId("_q_appmetrica_user_profile_id"),
PushWooshHwId("_q_pushwoosh_hwid"),
PushWooshUserId("_q_pushwoosh_user_id"),
Custom("");

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ internal class QProductCenterManager internal constructor(
onSuccess: (permissions: Map<String, QPermission>) -> Unit,
onError: (QonversionError) -> Unit
) {
if (launchError != null || unhandledLogoutAvailable) {
fun actualizePermissions() {
retryLaunch(
onSuccess = { launchResult ->
onSuccess(launchResult.permissions)
Expand All @@ -869,9 +869,25 @@ internal class QProductCenterManager internal constructor(
onSuccess(it)
} ?: onError(error)
})
} else {
val permissions = launchResultCache.getActualPermissions() ?: emptyMap()
}

if (launchError != null || unhandledLogoutAvailable) {
actualizePermissions()
return
}

val permissions = launchResultCache.getActualPermissions() ?: emptyMap()

val nowMs = System.currentTimeMillis()
val permissionsAreActual = permissions.none {
val expirationTs = it.value.expirationDate?.time ?: Long.MAX_VALUE
it.value.isActive() && expirationTs < nowMs
}

if (permissionsAreActual) {
onSuccess(permissions)
} else {
actualizePermissions()
}
}

Expand Down

0 comments on commit 3dad614

Please sign in to comment.