From 30f1a0815f7295c541b3031e82837f13449113d7 Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Mon, 3 Apr 2023 14:13:50 +0600 Subject: [PATCH] 1116-Disable_sync_for_readonly_tasks issue: https://gitlab.e.foundation/e/os/backlog/-/issues/1116 We want to sync tasks which is not readOnly. So we have to check for readOnly status of the collection when retrieving syncTaskList. --- app/src/main/java/at/bitfire/davdroid/db/CollectionDao.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/at/bitfire/davdroid/db/CollectionDao.kt b/app/src/main/java/at/bitfire/davdroid/db/CollectionDao.kt index 6e72ede3f..f210efde4 100644 --- a/app/src/main/java/at/bitfire/davdroid/db/CollectionDao.kt +++ b/app/src/main/java/at/bitfire/davdroid/db/CollectionDao.kt @@ -53,7 +53,7 @@ interface CollectionDao: SyncableDao { @Query("SELECT * FROM collection WHERE serviceId=:serviceId AND type='${Collection.TYPE_CALENDAR}' AND (supportsVTODO OR supportsVJOURNAL) AND sync ORDER BY displayName, url") fun getSyncJtxCollections(serviceId: Long): List - @Query("SELECT * FROM collection WHERE serviceId=:serviceId AND type='${Collection.TYPE_CALENDAR}' AND supportsVTODO AND sync ORDER BY displayName, url") + @Query("SELECT * FROM collection WHERE serviceId=:serviceId AND type='${Collection.TYPE_CALENDAR}' AND supportsVTODO AND sync AND NOT forceReadOnly AND privWriteContent ORDER BY displayName, url") fun getSyncTaskLists(serviceId: Long): List @Insert(onConflict = OnConflictStrategy.REPLACE) -- GitLab