mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-12 09:30:39 +01:00
fix #135, delete carddav contacts from RawContacts table
This commit is contained in:
parent
d2ce5f2772
commit
09298c9dde
@ -1220,10 +1220,10 @@ class ContactsHelper(val activity: BaseSimpleActivity) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
val operations = ArrayList<ContentProviderOperation>()
|
val operations = ArrayList<ContentProviderOperation>()
|
||||||
val selection = "${ContactsContract.Data.CONTACT_ID} = ?"
|
val selection = "${ContactsContract.RawContacts._ID} = ?"
|
||||||
contacts.filter { it.source != SMT_PRIVATE }.forEach {
|
contacts.filter { it.source != SMT_PRIVATE }.forEach {
|
||||||
ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI).apply {
|
ContentProviderOperation.newDelete(ContactsContract.RawContacts.CONTENT_URI).apply {
|
||||||
val selectionArgs = arrayOf(it.contactId.toString())
|
val selectionArgs = arrayOf(it.id.toString())
|
||||||
withSelection(selection, selectionArgs)
|
withSelection(selection, selectionArgs)
|
||||||
operations.add(build())
|
operations.add(build())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user