Skip to content

Commit 8c66e26

Browse files
committed
Merge release/2.8.1 into main
2 parents a180c19 + 6945cd0 commit 8c66e26

File tree

86 files changed

+607
-364
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+607
-364
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ fastlane/test_output
4848
# App Store Connect API keys
4949
*.p8
5050

51-
# IAP pricing configs (contain actual prices)
52-
fastlane/config/iap-*.json
51+
# Pricing configs (contain actual prices)
52+
fastlane/config/*.json

.swiftformat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
--minversion 0.58.3
1+
--minversion 0.60.1
22
--exclude DerivedData
33

44
# format options

Cryptomator.xcodeproj/project.pbxproj

Lines changed: 13 additions & 17 deletions
Large diffs are not rendered by default.

Cryptomator/AddVault/CreateNewVault/SetVaultNameViewModel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ class SetVaultNameViewModel: SingleSectionTableViewModel, SetVaultNameViewModelP
3535

3636
private lazy var subscribers = Set<AnyCancellable>()
3737

38-
// disallowed characters \ / : * ? " < > |
39-
// cannot end with .
38+
/// disallowed characters \ / : * ? " < > |
39+
/// cannot end with .
4040
func getValidatedVaultName() throws -> String {
4141
guard !trimmedVaultName.isEmpty else {
4242
throw SetVaultNameViewModelError.emptyVaultName

Cryptomator/AddVault/LocalVault/LocalFileSystemAuthenticationViewModel.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ class LocalFileSystemAuthenticationViewModel: SingleSectionTableViewModel, Local
6060
guard let rootURL = urls.first else {
6161
throw LocalFileSystemAuthenticationViewModelError.invalidURL
6262
}
63-
let credential = LocalFileSystemCredential(rootURL: rootURL, identifier: UUID().uuidString)
64-
return credential
63+
return LocalFileSystemCredential(rootURL: rootURL, identifier: UUID().uuidString)
6564
}
6665

6766
func validateAndSave(credential: LocalFileSystemCredential) -> Promise<CloudProviderAccount> {

Cryptomator/AppDelegate.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
7070
}
7171

7272
func application(_: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
73+
if url.scheme == "cryptomator" {
74+
if url.host == "purchase" {
75+
coordinator?.showPurchase()
76+
}
77+
return true
78+
}
7379
if url.scheme == CloudAccessSecrets.dropboxURLScheme {
7480
return DBClientsManager.handleRedirectURL(url) { authResult in
7581
guard let authResult = authResult else {

Cryptomator/Common/Cells/ButtonCellViewModel.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ import UIKit
1010

1111
class ButtonCellViewModel<T>: BindableTableViewCellViewModel {
1212
private let preferredCellStyle: UITableViewCell.CellStyle
13-
override var cellStyle: UITableViewCell.CellStyle { preferredCellStyle }
13+
override var cellStyle: UITableViewCell.CellStyle {
14+
preferredCellStyle
15+
}
16+
1417
let action: T
1518
init(action: T, title: String, titleTextColor: UIColor? = .cryptomatorPrimary, detailTitle: String? = nil, image: UIImage? = nil, isEnabled: Bool = true, selectionStyle: UITableViewCell.SelectionStyle = .default, accessoryType: UITableViewCell.AccessoryType = .none, cellStyle: UITableViewCell.CellStyle = .value1) {
1619
self.action = action

Cryptomator/Common/Cells/LoadingButtonCellViewModel.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
import Foundation
1010

1111
class LoadingButtonCellViewModel<T>: ButtonCellViewModel<T>, LoadingIndicatorSupport {
12-
override var type: ConfigurableTableViewCell.Type { LoadingButtonCell.self }
12+
override var type: ConfigurableTableViewCell.Type {
13+
LoadingButtonCell.self
14+
}
15+
1316
let isLoading: Bindable<Bool>
1417

1518
init(action: T, title: String, isLoading: Bool = false) {

Cryptomator/Common/CloudAccountList/AccountInfo.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ public struct AccountInfo: Decodable, FetchableRecord {
1414
let cloudProviderAccount: CloudProviderAccount
1515
private(set) var accountListPosition: AccountListPosition
1616

17-
init(cloudProviderAccount: CloudProviderAccount, accountListPosition: AccountListPosition) {
18-
self.cloudProviderAccount = cloudProviderAccount
19-
self.accountListPosition = accountListPosition
20-
}
21-
2217
var cloudProviderType: CloudProviderType {
2318
return cloudProviderAccount.cloudProviderType
2419
}

Cryptomator/Common/CloudAccountList/AccountListViewModel.swift

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,35 +66,31 @@ class AccountListViewModel: AccountListViewModelProtocol {
6666
func refreshDropboxItems() -> Promise<Void> {
6767
return all(accountInfos
6868
.map { DropboxCredential(tokenUID: $0.accountUID) }
69-
.map { self.createAccountCellContent(for: $0) }
70-
).then { accounts in
69+
.map { self.createAccountCellContent(for: $0) }).then { accounts in
7170
self.accounts = accounts
7271
}
7372
}
7473

7574
func refreshMicrosoftGraphItems() -> Promise<Void> {
7675
return all(accountInfos
7776
.compactMap { try? MicrosoftGraphAccountDBManager.shared.getAccount(for: $0.accountUID) }
78-
.compactMap { try? self.createAccountCellContent(for: $0) }
79-
).then { accounts in
77+
.compactMap { try? self.createAccountCellContent(for: $0) }).then { accounts in
8078
self.accounts = accounts
8179
}
8280
}
8381

8482
func refreshPCloudItems() -> Promise<Void> {
8583
return all(accountInfos
8684
.compactMap { try? PCloudCredential(userID: $0.accountUID) }
87-
.map { self.createAccountCellContent(for: $0) }
88-
).then { accounts in
85+
.map { self.createAccountCellContent(for: $0) }).then { accounts in
8986
self.accounts = accounts
9087
}
9188
}
9289

9390
func refreshBoxItems() -> Promise<Void> {
9491
return all(accountInfos
9592
.map { BoxCredential(tokenStorage: BoxTokenStorage(userID: $0.accountUID)) }
96-
.map { self.createAccountCellContent(for: $0) }
97-
).then { accounts in
93+
.map { self.createAccountCellContent(for: $0) }).then { accounts in
9894
self.accounts = accounts
9995
}
10096
}

0 commit comments

Comments
 (0)