Skip to content

Commit

Permalink
Upgrade to billing 6.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
d4rken committed Jul 5, 2023
1 parent 24add8c commit f990a7f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ dependencies {

implementation("io.coil-kt:coil:2.0.0-rc02")

"gplayImplementation"("com.android.billingclient:billing:4.0.0")
"gplayImplementation"("com.android.billingclient:billing:6.0.1")

// Support libs
implementation("androidx.core:core-ktx:1.8.0")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
package eu.darken.myperm.common.upgrade.core.client

import android.app.Activity
import com.android.billingclient.api.*
import com.android.billingclient.api.AcknowledgePurchaseParams
import com.android.billingclient.api.BillingClient
import com.android.billingclient.api.BillingFlowParams
import com.android.billingclient.api.BillingResult
import com.android.billingclient.api.Purchase
import com.android.billingclient.api.SkuDetails
import com.android.billingclient.api.SkuDetailsParams
import eu.darken.myperm.common.debug.logging.Logging.Priority.INFO
import eu.darken.myperm.common.debug.logging.Logging.Priority.WARN
import eu.darken.myperm.common.debug.logging.log
Expand All @@ -22,7 +28,7 @@ data class BillingClientConnection(
val purchases: Flow<Collection<Purchase>> = combine(purchasesGlobal, purchasesLocal) { global, local ->
val combined = mutableMapOf<String, Purchase>()
global.plus(local).toSet().sortedByDescending { it.purchaseTime }.forEach { purchase ->
combined[purchase.orderId] = purchase
combined[purchase.orderId!!] = purchase
}
combined.values
}
Expand Down

0 comments on commit f990a7f

Please sign in to comment.