From b7e9446cde19438656d837682e985b3791bd1f3c Mon Sep 17 00:00:00 2001 From: Alex Hart Date: Fri, 16 Aug 2024 15:27:06 -0300 Subject: [PATCH] Fix missed cancelation check. --- .../securesms/jobs/InAppPaymentRecurringContextJob.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/InAppPaymentRecurringContextJob.kt b/app/src/main/java/org/thoughtcrime/securesms/jobs/InAppPaymentRecurringContextJob.kt index 316872e8a1..1c715cfd46 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/InAppPaymentRecurringContextJob.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/InAppPaymentRecurringContextJob.kt @@ -238,8 +238,8 @@ class InAppPaymentRecurringContextJob private constructor( warning("Charge failure detected on active subscription: ${chargeFailure.code}: ${chargeFailure.message}") } - if (inAppPayment.data.redemption!!.keepAlive == true) { - warning("Payment failure during keep-alive, allow keep-alive to retry later.") + if (inAppPayment.data.redemption!!.keepAlive == true && !subscription.isCanceled) { + warning("Payment failure for uncanceled subscription during keep-alive, allow keep-alive to retry later.") SignalDatabase.inAppPayments.update( inAppPayment.copy(