diff --git a/client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/PremiumViewModel.kt b/client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/PremiumViewModel.kt index 23b033f183..e39c128b4b 100644 --- a/client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/PremiumViewModel.kt +++ b/client/viewmodel/premium/src/commonMain/kotlin/com/oztechan/ccc/client/viewmodel/premium/PremiumViewModel.kt @@ -55,9 +55,9 @@ class PremiumViewModel( .maxByOrNull { it.type.calculatePremiumEnd(it.date) }?.whether( - { type.calculatePremiumEnd(date).isNotPassed() }, - { date > appStorage.premiumEndDate }, - { PremiumType.getPurchaseIds().any { id -> id == type.data.id } } + { it.type.calculatePremiumEnd(it.date).isNotPassed() }, + { it.date > appStorage.premiumEndDate }, + { PremiumType.getPurchaseIds().any { id -> id == it.type.data.id } } )?.run { onPremiumActivated( adType = PremiumType.getById(type.data.id),