Skip to content

Commit

Permalink
Merge branch 'hotfix/2.4.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
tobihagemann committed Jul 19, 2022
2 parents e8ba35b + 1dc7e13 commit 08b1136
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 31 deletions.
4 changes: 2 additions & 2 deletions Cryptomator.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3243,7 +3243,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 2.4.0;
MARKETING_VERSION = 2.4.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -3305,7 +3305,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 2.4.0;
MARKETING_VERSION = 2.4.1;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "-Xfrontend -warn-long-expression-type-checking=200 -Xfrontend -warn-long-function-bodies=200";
Expand Down
39 changes: 10 additions & 29 deletions CryptomatorFileProvider/DB/ItemMetadataDBManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,38 +80,19 @@ class ItemMetadataDBManager: ItemMetadataManager {
}
}

// TODO: Optimize Code and/or DB Scheme
func cacheMetadata(_ itemMetadataList: [ItemMetadata]) throws {
try database.write { db in
for metadata in itemMetadataList {
try db.execute(
sql: """
INSERT INTO \(ItemMetadata.databaseTableName)
(\(ItemMetadata.Columns.name), \(ItemMetadata.Columns.type), \(ItemMetadata.Columns.size), \(ItemMetadata.Columns.parentID), \(ItemMetadata.Columns.lastModifiedDate), \(ItemMetadata.Columns.statusCode), \(ItemMetadata.Columns.cloudPath), \(ItemMetadata.Columns.isPlaceholderItem), \(ItemMetadata.Columns.isMaybeOutdated), \(ItemMetadata.Columns.favoriteRank), \(ItemMetadata.Columns.tagData)) VALUES
(:name, :type, :size, :parentID, :lastModifiedDate, :statusCode, :cloudPath, :isPlaceholderItem, :isMaybeOutdated, :favoriteRank, :tagData)
ON CONFLICT (\(ItemMetadata.Columns.cloudPath))
DO UPDATE SET \(ItemMetadata.Columns.name) = excluded.\(ItemMetadata.Columns.name),
\(ItemMetadata.Columns.type) = excluded.\(ItemMetadata.Columns.type),
\(ItemMetadata.Columns.size) = excluded.\(ItemMetadata.Columns.size),
\(ItemMetadata.Columns.parentID) = excluded.\(ItemMetadata.Columns.parentID),
\(ItemMetadata.Columns.lastModifiedDate) = excluded.\(ItemMetadata.Columns.lastModifiedDate),
\(ItemMetadata.Columns.cloudPath) = excluded.\(ItemMetadata.Columns.cloudPath),
\(ItemMetadata.Columns.isPlaceholderItem) = excluded.\(ItemMetadata.Columns.isPlaceholderItem),
\(ItemMetadata.Columns.isMaybeOutdated) = excluded.\(ItemMetadata.Columns.isMaybeOutdated)
""",
arguments: ["name": metadata.name,
"type": metadata.type,
"size": metadata.size,
"parentID": metadata.parentID,
"lastModifiedDate": metadata.lastModifiedDate,
"statusCode": metadata.statusCode,
"cloudPath": metadata.cloudPath,
"isPlaceholderItem": metadata.isPlaceholderItem,
"isMaybeOutdated": metadata.isMaybeOutdated,
"favoriteRank": metadata.favoriteRank,
"tagData": metadata.tagData]
)
let metadataID = db.lastInsertedRowID
metadata.id = metadataID
if let cachedMetadata = try ItemMetadata.fetchOne(db, key: ["cloudPath": metadata.cloudPath]) {
metadata.id = cachedMetadata.id
metadata.statusCode = cachedMetadata.statusCode
metadata.tagData = cachedMetadata.tagData
metadata.favoriteRank = cachedMetadata.favoriteRank
try metadata.update(db)
} else {
try metadata.insert(db)
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions fastlane/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Hotfix for "empty vaults" bug. Here are the release notes of 2.4.0:

- Added support for S3 (#238)
- Added additional Shortcut intents for "Get Lock Status", "Open Vault", and "Lock Vault" (#229, #233)
- Added quicker unlock when Touch ID / Face ID is set up (#225)
Expand Down
2 changes: 2 additions & 0 deletions fastlane/metadata/de-DE/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Hotfix für „leere Tresore“ Fehler. Hier sind die Release Notes von 2.4.0:

- Unterstützung für S3 hinzugefügt (#238)
- Zusätzliche Shortcut-Intents für „Sperrstatus abfragen“, „Tresor öffnen“ und „Tresor sperren“ hinzugefügt (#229, #233)
- Schnelleres Entsperren hinzugefügt, wenn Touch ID / Face ID eingerichtet ist (#225)
Expand Down
2 changes: 2 additions & 0 deletions fastlane/metadata/en-US/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Hotfix for "empty vaults" bug. Here are the release notes of 2.4.0:

- Added support for S3 (#238)
- Added additional Shortcut intents for "Get Lock Status", "Open Vault", and "Lock Vault" (#229, #233)
- Added quicker unlock when Touch ID / Face ID is set up (#225)
Expand Down

0 comments on commit 08b1136

Please sign in to comment.