Various improvements

This commit is contained in:
Ilya Laktyushin
2022-08-10 14:52:24 +03:00
parent 455a3f89d5
commit 4629b403cc
12 changed files with 848 additions and 745 deletions

View File

@@ -7,6 +7,7 @@ import TelegramCore
import TelegramStringFormatting
private let productIdentifiers = [
"org.telegram.telegramPremium.annual",
"org.telegram.telegramPremium.monthly",
"org.telegram.telegramPremium.twelveMonths",
"org.telegram.telegramPremium.sixMonths",
@@ -50,7 +51,7 @@ public final class InAppPurchaseManager: NSObject {
} else if #available(iOS 11.2, *) {
return self.skProduct.subscriptionPeriod != nil
} else {
return self.id.contains(".monthly")
return self.id.hasSuffix(".monthly") || self.id.hasSuffix(".annual")
}
}