Skip to content

Commit

Permalink
Merge branch 'release/2.6.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
tobihagemann committed Nov 30, 2024
2 parents 5b9104b + 8e46812 commit c7b8b2c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Cryptomator/Purchase/PurchaseViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,12 @@ class PurchaseViewModel: BaseIAPViewModel, ProductFetching {

private func addLifetimeLicenseItem() {
if let product = products[.fullVersion], let localizedPrice = product.localizedPrice {
// Temporarily added for December 2024 Sale
let currentYear = Calendar.current.component(.year, from: Date())
let currentMonth = Calendar.current.component(.month, from: Date())
let productDetail = currentYear == 2024 && currentMonth == 12 ? "🎁 33%* off in December" : nil
let viewModel = PurchaseCellViewModel(productName: LocalizedString.getValue("purchase.product.lifetimeLicense"),
productDetail: "🎁 33%* off in December",
productDetail: productDetail,
price: localizedPrice,
purchaseDetail: LocalizedString.getValue("purchase.product.lifetimeLicense.duration"),
productIdentifier: .fullVersion)
Expand Down
2 changes: 1 addition & 1 deletion CryptomatorTests/Purchase/PurchaseViewModelTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class PurchaseViewModelTests: IAPViewModelTestCase {

private var lifetimeLicenseCell: Item {
return .purchaseCell(.init(productName: LocalizedString.getValue("purchase.product.lifetimeLicense"),
productDetail: "🎁 33%* off in December",
productDetail: nil,
price: "$11.99",
purchaseDetail: LocalizedString.getValue("purchase.product.lifetimeLicense.duration"),
productIdentifier: .fullVersion))
Expand Down

0 comments on commit c7b8b2c

Please sign in to comment.