From ce74d57dc5371202abf465470b1966e0e7237aae Mon Sep 17 00:00:00 2001 From: Patrick Lang <72232737+patrickunterwegs@users.noreply.github.com> Date: Fri, 22 Nov 2024 16:04:48 +0100 Subject: [PATCH 1/3] Added sync_id column in JtxContract --- lib/src/main/kotlin/at/techbee/jtx/JtxContract.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/src/main/kotlin/at/techbee/jtx/JtxContract.kt b/lib/src/main/kotlin/at/techbee/jtx/JtxContract.kt index 3707a005..31ea075f 100644 --- a/lib/src/main/kotlin/at/techbee/jtx/JtxContract.kt +++ b/lib/src/main/kotlin/at/techbee/jtx/JtxContract.kt @@ -46,7 +46,7 @@ object JtxContract { const val AUTHORITY = "at.techbee.jtx.provider" /** The version of this SyncContentProviderContract */ - const val VERSION = 7 + const val VERSION = 8 /** Constructs an Uri for the Jtx Sync Adapter with the given Account * @param [account] The account that should be appended to the Base Uri @@ -1215,6 +1215,12 @@ object JtxContract { */ const val LAST_SYNC = "lastsync" + /** + * Purpose: This column/property stores a sync_id for the given collection + * See https://github.com/TechbeeAT/jtxBoard/issues/1635 + * Type: [Long] + */ + const val SYNC_ID = "sync_id" } From c2857ad3ad9b2e9e9c4e578bd3a3a739fc2f8ac7 Mon Sep 17 00:00:00 2001 From: Ricki Hirner Date: Sun, 24 Nov 2024 15:09:48 +0100 Subject: [PATCH 2/3] Raise minimum jtx Board version --- .../kotlin/at/bitfire/ical4android/TaskProvider.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/src/main/kotlin/at/bitfire/ical4android/TaskProvider.kt b/lib/src/main/kotlin/at/bitfire/ical4android/TaskProvider.kt index 7a2c02a1..eb00267f 100644 --- a/lib/src/main/kotlin/at/bitfire/ical4android/TaskProvider.kt +++ b/lib/src/main/kotlin/at/bitfire/ical4android/TaskProvider.kt @@ -22,14 +22,14 @@ class TaskProvider private constructor( ): Closeable { enum class ProviderName( - val authority: String, - val packageName: String, - val minVersionCode: Long, - val minVersionName: String, - private val readPermission: String, - private val writePermission: String + val authority: String, + val packageName: String, + val minVersionCode: Long, + val minVersionName: String, + private val readPermission: String, + private val writePermission: String ) { - JtxBoard("at.techbee.jtx.provider", "at.techbee.jtx", 207000001, "2.07.00", PERMISSION_JTX_READ, PERMISSION_JTX_WRITE), + JtxBoard("at.techbee.jtx.provider", "at.techbee.jtx", 210000000, "2.10.00", PERMISSION_JTX_READ, PERMISSION_JTX_WRITE), TasksOrg("org.tasks.opentasks", "org.tasks", 100000, "10.0", PERMISSION_TASKS_ORG_READ, PERMISSION_TASKS_ORG_WRITE), OpenTasks("org.dmfs.tasks", "org.dmfs.tasks", 103, "1.1.8.2", PERMISSION_OPENTASKS_READ, PERMISSION_OPENTASKS_WRITE); From 1ecb919bae58b36591ea21c9d0ac7540dbce0951 Mon Sep 17 00:00:00 2001 From: Ricki Hirner Date: Sun, 24 Nov 2024 15:38:59 +0100 Subject: [PATCH 3/3] AndroidCalendar, JtxCollection: add syncId column --- .../kotlin/at/bitfire/ical4android/AndroidCalendarTest.kt | 2 +- .../main/kotlin/at/bitfire/ical4android/AndroidCalendar.kt | 4 ++++ lib/src/main/kotlin/at/bitfire/ical4android/JtxCollection.kt | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/src/androidTest/kotlin/at/bitfire/ical4android/AndroidCalendarTest.kt b/lib/src/androidTest/kotlin/at/bitfire/ical4android/AndroidCalendarTest.kt index 669de0c2..a9d5e1d8 100644 --- a/lib/src/androidTest/kotlin/at/bitfire/ical4android/AndroidCalendarTest.kt +++ b/lib/src/androidTest/kotlin/at/bitfire/ical4android/AndroidCalendarTest.kt @@ -125,4 +125,4 @@ class AndroidCalendarTest { } } -} +} \ No newline at end of file diff --git a/lib/src/main/kotlin/at/bitfire/ical4android/AndroidCalendar.kt b/lib/src/main/kotlin/at/bitfire/ical4android/AndroidCalendar.kt index f7ec09ed..1981dc9b 100644 --- a/lib/src/main/kotlin/at/bitfire/ical4android/AndroidCalendar.kt +++ b/lib/src/main/kotlin/at/bitfire/ical4android/AndroidCalendar.kt @@ -165,6 +165,8 @@ abstract class AndroidCalendar( var ownerAccount: String? = null + var syncId: String? = null + /** * Sets the calendar properties ([name], [displayName] etc.) from the passed argument, @@ -186,6 +188,8 @@ abstract class AndroidCalendar( isVisible = info.getAsInteger(Calendars.VISIBLE) != 0 ownerAccount = info.getAsString(Calendars.OWNER_ACCOUNT) + + syncId = info.getAsString(Calendars._SYNC_ID) } diff --git a/lib/src/main/kotlin/at/bitfire/ical4android/JtxCollection.kt b/lib/src/main/kotlin/at/bitfire/ical4android/JtxCollection.kt index 7e926d7a..c87b5a3d 100644 --- a/lib/src/main/kotlin/at/bitfire/ical4android/JtxCollection.kt +++ b/lib/src/main/kotlin/at/bitfire/ical4android/JtxCollection.kt @@ -60,6 +60,8 @@ open class JtxCollection(val account: Account, var supportsVTODO = true var supportsVJOURNAL = true + var syncId: Long? = null + var context: Context? = null @@ -85,6 +87,8 @@ open class JtxCollection(val account: Account, supportsVJOURNAL = values.getAsString(JtxContract.JtxCollection.SUPPORTSVJOURNAL) == "1" || values.getAsString(JtxContract.JtxCollection.SUPPORTSVJOURNAL) == "true" + syncId = values.getAsLong(JtxContract.JtxCollection.SYNC_ID) + this.context = context }