Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bitfireAT/davx5-ose.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunik Kupfer <kupfer@bitfire.at>2022-10-21 13:29:19 +0300
committerRicki Hirner <hirner@bitfire.at>2022-10-21 14:41:21 +0300
commit0f124cf5b5aae71aec1006aa096c7582a0b5a1e2 (patch)
treeeba12965d88fdc334a3cb5d5cd922f4b48c33577
parent9bd564b2c6f461f05ae6282f2fae47cc8d60c162 (diff)
LocalAddressBook: update read-only flag of groups, too (bitfireAT/davx5#153)
* LocalAddressBook: update read-only flag of groups, too Co-authored-by: Ricki Hirner <hirner@bitfire.at>
-rw-r--r--app/src/main/java/at/bitfire/davdroid/resource/LocalAddressBook.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/src/main/java/at/bitfire/davdroid/resource/LocalAddressBook.kt b/app/src/main/java/at/bitfire/davdroid/resource/LocalAddressBook.kt
index 7e4e28f0..3244d955 100644
--- a/app/src/main/java/at/bitfire/davdroid/resource/LocalAddressBook.kt
+++ b/app/src/main/java/at/bitfire/davdroid/resource/LocalAddressBook.kt
@@ -253,6 +253,11 @@ open class LocalAddressBook(
val dataValues = ContentValues(1)
dataValues.put(ContactsContract.Data.IS_READ_ONLY, if (nowReadOnly) 1 else 0)
provider!!.update(syncAdapterURI(ContactsContract.Data.CONTENT_URI), dataValues, null, null)
+
+ // update group rows
+ val groupValues = ContentValues(1)
+ groupValues.put(Groups.GROUP_IS_READ_ONLY, if (nowReadOnly) 1 else 0)
+ provider!!.update(groupsSyncUri(), groupValues, null, null)
}
// make sure it will still be synchronized when contacts are updated