mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-25 23:57:52 +01:00
use contact_id instead of raw_contact_id at contact deleting too
This commit is contained in:
parent
aed1147e9f
commit
40f1fc82dd
@ -1011,10 +1011,10 @@ class ContactsHelper(val activity: BaseSimpleActivity) {
|
|||||||
try {
|
try {
|
||||||
val contactIDs = HashSet<String>()
|
val contactIDs = HashSet<String>()
|
||||||
val operations = ArrayList<ContentProviderOperation>()
|
val operations = ArrayList<ContentProviderOperation>()
|
||||||
val selection = "${ContactsContract.Data.RAW_CONTACT_ID} = ?"
|
val selection = "${ContactsContract.Data.CONTACT_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.Data.CONTENT_URI).apply {
|
||||||
val selectionArgs = arrayOf(it.id.toString())
|
val selectionArgs = arrayOf(it.contactId.toString())
|
||||||
withSelection(selection, selectionArgs)
|
withSelection(selection, selectionArgs)
|
||||||
operations.add(this.build())
|
operations.add(this.build())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user