From 84be6730ff97fe897f7468fa711dfd97c72d28e1 Mon Sep 17 00:00:00 2001 From: Mygod Date: Tue, 28 Jul 2020 04:36:07 +0800 Subject: [PATCH] queryPurchases in background --- mobile/src/main/java/be/mygod/vpnhotspot/EBegFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/EBegFragment.kt b/mobile/src/main/java/be/mygod/vpnhotspot/EBegFragment.kt index 77eb1d4f..3b4ebc56 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/EBegFragment.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/EBegFragment.kt @@ -32,7 +32,7 @@ class EBegFragment : AppCompatDialogFragment() { } override fun onBillingSetupFinished(billingResult: BillingResult) { - if (billingResult.responseCode == BillingClient.BillingResponseCode.OK) { + if (billingResult.responseCode == BillingClient.BillingResponseCode.OK) GlobalScope.launch(Dispatchers.IO) { billingClient.queryPurchases(BillingClient.SkuType.INAPP).apply { if (responseCode == BillingClient.BillingResponseCode.OK) { onPurchasesUpdated(this.billingResult, purchasesList)