Remove unnecessary subscriber call for manual cancel.

This commit is contained in:
Alex Hart
2024-06-03 13:30:50 -03:00
committed by Cody Henthorne
parent 6dcb2e8d24
commit 30b339a482
2 changed files with 15 additions and 14 deletions

View File

@@ -298,8 +298,7 @@ object InAppPaymentsRepository {
@JvmStatic
@WorkerThread
fun isUserManuallyCancelled(subscriberType: InAppPaymentSubscriberRecord.Type): Boolean {
val subscriber = getSubscriber(subscriberType) ?: return false
val latestSubscription = SignalDatabase.inAppPayments.getLatestInAppPaymentByType(subscriber.type.inAppPaymentType)
val latestSubscription = SignalDatabase.inAppPayments.getLatestInAppPaymentByType(subscriberType.inAppPaymentType)
return if (latestSubscription == null) {
SignalStore.donationsValues().isUserManuallyCancelled()