fix #135, delete carddav contacts from RawContacts table
This commit is contained in:
parent
d2ce5f2772
commit
09298c9dde
1 changed files with 3 additions and 3 deletions
|
|
@ -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…
Reference in a new issue