From c3821fbfc9452f8cd2c23ef954ca30d731aaa3a9 Mon Sep 17 00:00:00 2001 From: William Brawner Date: Wed, 10 Jun 2020 10:20:55 -0700 Subject: [PATCH] fixup! Update dependencies Signed-off-by: William Brawner --- .../simplemarkdown/view/activity/SupportActivity.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/SupportActivity.kt b/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/SupportActivity.kt index 45fa84c..5990a65 100644 --- a/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/SupportActivity.kt +++ b/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/SupportActivity.kt @@ -67,8 +67,8 @@ class SupportActivity : AppCompatActivity(), BillingClientStateListener, Purchas return super.onOptionsItemSelected(item) } - override fun onBillingSetupFinished(result: BillingResult?) { - if (result?.responseCode != BillingClient.BillingResponseCode.OK) { + override fun onBillingSetupFinished(result: BillingResult) { + if (result.responseCode != BillingClient.BillingResponseCode.OK) { return } @@ -78,7 +78,7 @@ class SupportActivity : AppCompatActivity(), BillingClientStateListener, Purchas .build() billingClient.querySkuDetailsAsync(skuDetails) { skuDetailsResponse, skuDetailsList -> // Process the result. - if (skuDetailsResponse?.responseCode != BillingClient.BillingResponseCode.OK || skuDetailsList.isNullOrEmpty()) { + if (skuDetailsResponse.responseCode != BillingClient.BillingResponseCode.OK || skuDetailsList.isNullOrEmpty()) { return@querySkuDetailsAsync } @@ -104,7 +104,7 @@ class SupportActivity : AppCompatActivity(), BillingClientStateListener, Purchas billingClient.startConnection(this) } - override fun onPurchasesUpdated(result: BillingResult?, purchases: MutableList?) { + override fun onPurchasesUpdated(result: BillingResult, purchases: MutableList?) { purchases?.forEach { purchase -> val consumeParams = ConsumeParams.newBuilder() .setPurchaseToken(purchase.purchaseToken)