Skip to content

Commit c39a1a4

Browse files
committed
Applied SwiftFormat
1 parent 90d2f2e commit c39a1a4

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

Cryptomator/Purchase/PurchaseViewModel.swift

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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)

Cryptomator/Purchase/UpgradeViewModel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class UpgradeViewModel: BaseIAPViewModel, ProductFetching {
3434
func addFreeUpgradeItem() {
3535
guard products[.freeUpgrade] != nil else { return }
3636
let viewModel = PurchaseCellViewModel(productName: LocalizedString.getValue("purchase.product.freeUpgrade"),
37-
productDetail: nil,
37+
productDetail: nil,
3838
price: LocalizedString.getValue("purchase.product.pricing.free"),
3939
purchaseDetail: nil,
4040
productIdentifier: .freeUpgrade)
@@ -44,7 +44,7 @@ class UpgradeViewModel: BaseIAPViewModel, ProductFetching {
4444
func addPaidUpgradeItem() {
4545
if let product = products[.paidUpgrade], let localizedPrice = product.localizedPrice {
4646
let viewModel = PurchaseCellViewModel(productName: LocalizedString.getValue("purchase.product.donateAndUpgrade"),
47-
productDetail: nil,
47+
productDetail: nil,
4848
price: localizedPrice,
4949
purchaseDetail: LocalizedString.getValue("purchase.product.lifetimeLicense.duration"),
5050
productIdentifier: .paidUpgrade)

Cryptomator/VaultList/VaultListViewController.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class VaultListViewController: ListViewController<VaultCellViewModel> {
125125
let currentYear = Calendar.current.component(.year, from: Date())
126126
let currentMonth = Calendar.current.component(.month, from: Date())
127127
// TODO: Change `currentMonth == 11` to `12`
128-
if currentYear == 2024 && currentMonth == 11 && !(cryptomatorSettings.fullVersionUnlocked || cryptomatorSettings.hasRunningSubscription) && !cryptomatorSettings.december2024BannerDismissed {
128+
if currentYear == 2024, currentMonth == 11, !(cryptomatorSettings.fullVersionUnlocked || cryptomatorSettings.hasRunningSubscription), !cryptomatorSettings.december2024BannerDismissed {
129129
showBanner()
130130
}
131131
}
@@ -143,7 +143,6 @@ class VaultListViewController: ListViewController<VaultCellViewModel> {
143143
emojiLabel.setContentHuggingPriority(.required, for: .horizontal)
144144
emojiLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
145145

146-
147146
let textLabel = UILabel()
148147
textLabel.text = LocalizedString.getValue("purchase.discount")
149148
textLabel.textColor = .white

CryptomatorCommon/Sources/CryptomatorCommonCore/CryptomatorUserDefaults.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ extension CryptomatorUserDefaults: CryptomatorSettings {
111111
get { read() ?? false }
112112
set { write(value: newValue) }
113113
}
114-
114+
115115
#if !ALWAYS_PREMIUM
116116
public var december2024BannerDismissed: Bool {
117117
get { read() ?? false }

0 commit comments

Comments
 (0)