@@ -32,16 +32,17 @@ class PurchaseViewModel: BaseIAPViewModel, ProductFetching {
3232 override var title : String ? {
3333 return LocalizedString . getValue ( " purchase.title " )
3434 }
35+
3536 // Temporarily added for December 2024 Sale
3637 override var infoText : NSAttributedString ? {
3738 let currentYear = Calendar . current. component ( . year, from: Date ( ) )
3839 let currentMonth = Calendar . current. component ( . month, from: Date ( ) )
3940 // TODO: Change `currentMonth == 11` to `12`
4041 if currentYear == 2024 && currentMonth == 11 {
4142 return . textWithLeadingSystemImage( " info.circle.fill " ,
42- text: LocalizedString . getValue ( " purchase.discount " ) ,
43- font: . preferredFont( forTextStyle: . body) ,
44- color: . secondaryLabel)
43+ text: LocalizedString . getValue ( " purchase.discount " ) ,
44+ font: . preferredFont( forTextStyle: . body) ,
45+ color: . secondaryLabel)
4546 } else {
4647 return nil
4748 }
@@ -70,7 +71,7 @@ class PurchaseViewModel: BaseIAPViewModel, ProductFetching {
7071 cells. append ( . trialCell( TrialCellViewModel ( expirationDate: trialExpirationDate) ) )
7172 } else {
7273 cells. append ( . purchaseCell( PurchaseCellViewModel ( productName: LocalizedString . getValue ( " purchase.product.trial " ) ,
73- productDetail: nil ,
74+ productDetail: nil ,
7475 price: LocalizedString . getValue ( " purchase.product.pricing.free " ) ,
7576 purchaseDetail: LocalizedString . getValue ( " purchase.product.trial.duration " ) ,
7677 productIdentifier: . thirtyDayTrial) ) )
@@ -80,7 +81,7 @@ class PurchaseViewModel: BaseIAPViewModel, ProductFetching {
8081 private func addSubscriptionItem( ) {
8182 if let product = products [ . yearlySubscription] , let localizedPrice = product. localizedPrice {
8283 let viewModel = PurchaseCellViewModel ( productName: LocalizedString . getValue ( " purchase.product.yearlySubscription " ) ,
83- productDetail: nil ,
84+ productDetail: nil ,
8485 price: localizedPrice,
8586 purchaseDetail: LocalizedString . getValue ( " purchase.product.yearlySubscription.duration " ) ,
8687 productIdentifier: . yearlySubscription)
@@ -91,7 +92,7 @@ class PurchaseViewModel: BaseIAPViewModel, ProductFetching {
9192 private func addLifetimeLicenseItem( ) {
9293 if let product = products [ . fullVersion] , let localizedPrice = product. localizedPrice {
9394 let viewModel = PurchaseCellViewModel ( productName: LocalizedString . getValue ( " purchase.product.lifetimeLicense " ) ,
94- productDetail: LocalizedString . getValue ( " purchase.product.lifetimeLicense.detail " ) ,
95+ productDetail: LocalizedString . getValue ( " purchase.product.lifetimeLicense.detail " ) ,
9596 price: localizedPrice,
9697 purchaseDetail: LocalizedString . getValue ( " purchase.product.lifetimeLicense.duration " ) ,
9798 productIdentifier: . fullVersion)
0 commit comments