@@ -26,7 +26,7 @@ import com.superwall.sdk.delegate.PurchaseResult
2626import com.superwall.sdk.delegate.RestorationResult
2727import com.superwall.sdk.delegate.subscription_controller.PurchaseController
2828import com.superwall.sdk.models.entitlements.Entitlement
29- import com.superwall.sdk.models.entitlements.EntitlementStatus
29+ import com.superwall.sdk.models.entitlements.SubscriptionStatus
3030import kotlinx.coroutines.CompletableDeferred
3131
3232suspend fun Purchases.awaitProducts (productIds : List <String >): List <StoreProduct > {
@@ -125,16 +125,16 @@ class RevenueCatPurchaseController(
125125 // Refetch the customer info on load
126126 Purchases .sharedInstance.getCustomerInfoWith {
127127 if (hasAnyActiveEntitlements(it)) {
128- setEntitlementStatus (
129- EntitlementStatus .Active (
128+ setSubscriptionStatus (
129+ SubscriptionStatus .Active (
130130 it.entitlements.active
131131 .map {
132132 Entitlement (it.key, Entitlement .Type .SERVICE_LEVEL )
133133 }.toSet(),
134134 ),
135135 )
136136 } else {
137- setEntitlementStatus( EntitlementStatus .Inactive )
137+ setSubscriptionStatus( SubscriptionStatus .Inactive )
138138 }
139139 }
140140 }
@@ -144,16 +144,16 @@ class RevenueCatPurchaseController(
144144 */
145145 override fun onReceived (customerInfo : CustomerInfo ) {
146146 if (hasAnyActiveEntitlements(customerInfo)) {
147- setEntitlementStatus (
148- EntitlementStatus .Active (
147+ setSubscriptionStatus (
148+ SubscriptionStatus .Active (
149149 customerInfo.entitlements.active
150150 .map {
151151 Entitlement (it.key, Entitlement .Type .SERVICE_LEVEL )
152152 }.toSet(),
153153 ),
154154 )
155155 } else {
156- setEntitlementStatus( EntitlementStatus .Inactive )
156+ setSubscriptionStatus( SubscriptionStatus .Inactive )
157157 }
158158 }
159159
@@ -288,9 +288,9 @@ class RevenueCatPurchaseController(
288288 return entitlements.isNotEmpty()
289289 }
290290
291- private fun setEntitlementStatus ( entitlementStatus : EntitlementStatus ) {
291+ private fun setSubscriptionStatus ( subscriptionStatus : SubscriptionStatus ) {
292292 if (Superwall .initialized) {
293- Superwall .instance.setEntitlementStatus(entitlementStatus )
293+ Superwall .instance.setSubscriptionStatus(subscriptionStatus )
294294 }
295295 }
296296}
0 commit comments