Skip to content

Commit 12b366e

Browse files
committed
Return notif serializer
1 parent d5c5841 commit 12b366e

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

superwall/src/main/java/com/superwall/sdk/network/JsonFactory.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.superwall.sdk.network
22

3+
import com.superwall.sdk.models.paywall.LocalNotificationTypeSerializer
34
import com.superwall.sdk.models.serialization.DateSerializer
45
import kotlinx.serialization.json.Json
56
import kotlinx.serialization.json.JsonNamingStrategy
@@ -15,6 +16,7 @@ interface JsonFactory {
1516
namingStrategy = JsonNamingStrategy.SnakeCase
1617
serializersModule =
1718
SerializersModule {
19+
LocalNotificationTypeSerializer
1820
contextual(Date::class, DateSerializer)
1921
}
2022
}

superwall/src/main/java/com/superwall/sdk/store/abstractions/product/receipt/ReceiptManager.kt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ class ReceiptManager(
3838
private var delegate: ProductsFetcher?,
3939
private val billing: Billing,
4040
private val ioScope: IOScope = IOScope(),
41-
// private val receiptData: () -> ByteArray? = ReceiptLogic::getReceiptData
4241
) {
43-
var latestSubscriptionStateValue: LatestSubscriptionState? = null
4442
var latestSubscriptionWillAutoRenew: Boolean? = null
4543
var latestSubscriptionPeriodType: LatestPeriodType? = null
4644
var transactionReceipts: MutableList<TransactionReceipt> = mutableListOf()
@@ -52,9 +50,7 @@ class ReceiptManager(
5250
val subscriptions: List<SubscriptionTransaction>,
5351
)
5452

55-
var purchasedSubscriptionGroupIds: Set<String>? = null
5653
private var _purchases: MutableSet<InAppPurchase> = mutableSetOf()
57-
private var receiptRefreshCompletion: ((Boolean) -> Unit)? = null
5854
private val latestSubscriptionState: MutableStateFlow<LatestSubscriptionState> =
5955
MutableStateFlow(LatestSubscriptionState.UNKNOWN)
6056

@@ -503,16 +499,6 @@ class ReceiptManager(
503499
}
504500
}
505501

506-
suspend fun loadIntroOfferEligibility(storeProducts: Set<StoreProduct>) {
507-
// Android doesn't have a direct equivalent to iOS intro offer eligibility
508-
// This would need to be implemented based on purchase history analysis
509-
Logger.debug(
510-
logLevel = LogLevel.debug,
511-
scope = LogScope.receipts,
512-
message = "loadIntroOfferEligibility called for ${storeProducts.size} products",
513-
)
514-
}
515-
516502
suspend fun isEligibleForIntroOffer(storeProduct: StoreProduct): Boolean {
517503
// Check if user has never purchased this subscription before
518504
val hasExistingPurchase =

0 commit comments

Comments
 (0)