mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
use batching at contact deleting
This commit is contained in:
@ -1227,6 +1227,11 @@ class ContactsHelper(val activity: BaseSimpleActivity) {
|
|||||||
withSelection(selection, selectionArgs)
|
withSelection(selection, selectionArgs)
|
||||||
operations.add(build())
|
operations.add(build())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (operations.size % BATCH_SIZE == 0) {
|
||||||
|
activity.contentResolver.applyBatch(ContactsContract.AUTHORITY, operations)
|
||||||
|
operations.clear()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
activity.contentResolver.applyBatch(ContactsContract.AUTHORITY, operations)
|
activity.contentResolver.applyBatch(ContactsContract.AUTHORITY, operations)
|
||||||
|
Reference in New Issue
Block a user