From d471d8a59846cd05b73548f8b70f0b734b88a376 Mon Sep 17 00:00:00 2001 From: Dima Date: Tue, 4 Jun 2024 19:38:07 +0900 Subject: [PATCH] Fix for error "unknownField '.deleted'" during sync. Upping versionCode to 73. --- .../java/org/zotero/android/database/objects/FieldKeys.kt | 5 +++-- .../android/database/requests/ReadCollectionsDbRequest.kt | 2 ++ buildSrc/src/main/kotlin/BuildConfig.kt | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/zotero/android/database/objects/FieldKeys.kt b/app/src/main/java/org/zotero/android/database/objects/FieldKeys.kt index 92e73a2d..fc3002a6 100644 --- a/app/src/main/java/org/zotero/android/database/objects/FieldKeys.kt +++ b/app/src/main/java/org/zotero/android/database/objects/FieldKeys.kt @@ -6,7 +6,8 @@ import timber.log.Timber class FieldKeys { class Collection { companion object { - val knownDataKeys = listOf("key", "version", "name", "parentCollection", "relations") + val knownDataKeys = + listOf("key", "version", "name", "parentCollection", "relations", "deleted") } } @@ -224,7 +225,7 @@ class FieldKeys { class Search { companion object { - val knownDataKeys = listOf("key", "version", "name", "conditions") + val knownDataKeys = listOf("key", "version", "name", "conditions", "deleted") } } diff --git a/app/src/main/java/org/zotero/android/database/requests/ReadCollectionsDbRequest.kt b/app/src/main/java/org/zotero/android/database/requests/ReadCollectionsDbRequest.kt index dfba50e5..936bad2c 100644 --- a/app/src/main/java/org/zotero/android/database/requests/ReadCollectionsDbRequest.kt +++ b/app/src/main/java/org/zotero/android/database/requests/ReadCollectionsDbRequest.kt @@ -21,6 +21,8 @@ class ReadCollectionsDbRequest( .and() .deleted(false) .and() + .isTrash(false) + .and() .keyNotIn(this.excludedKeys) .findAll() } diff --git a/buildSrc/src/main/kotlin/BuildConfig.kt b/buildSrc/src/main/kotlin/BuildConfig.kt index 5c1ebc0f..845a3e5c 100644 --- a/buildSrc/src/main/kotlin/BuildConfig.kt +++ b/buildSrc/src/main/kotlin/BuildConfig.kt @@ -4,7 +4,7 @@ object BuildConfig { const val compileSdkVersion = 34 const val targetSdk = 33 - val versionCode = 72 // Must be updated on every build + val versionCode = 73 // Must be updated on every build val version = Version( major = 1, minor = 0,