tweak deleting contacts from groups a bit
This commit is contained in:
parent
4fca6ce711
commit
67cf029e91
|
@ -27,9 +27,9 @@ import com.simplemobiletools.contacts.models.*
|
|||
import kotlinx.android.synthetic.main.activity_edit_contact.*
|
||||
import kotlinx.android.synthetic.main.item_edit_address.view.*
|
||||
import kotlinx.android.synthetic.main.item_edit_email.view.*
|
||||
import kotlinx.android.synthetic.main.item_edit_group.view.*
|
||||
import kotlinx.android.synthetic.main.item_edit_phone_number.view.*
|
||||
import kotlinx.android.synthetic.main.item_event.view.*
|
||||
import kotlinx.android.synthetic.main.item_edit_group.view.*
|
||||
import org.joda.time.DateTime
|
||||
import org.joda.time.format.DateTimeFormat
|
||||
import java.util.*
|
||||
|
|
|
@ -670,8 +670,8 @@ class ContactsHelper(val activity: BaseSimpleActivity) {
|
|||
if (relevantGroupIDs.isNotEmpty()) {
|
||||
val IDsString = TextUtils.join(",", relevantGroupIDs)
|
||||
ContentProviderOperation.newDelete(ContactsContract.Data.CONTENT_URI).apply {
|
||||
val selection = "${ContactsContract.Data.RAW_CONTACT_ID} = ? AND ${ContactsContract.Data.MIMETYPE} = ? AND ${ContactsContract.Data.DATA1} IN (?)"
|
||||
val selectionArgs = arrayOf(contact.id.toString(), CommonDataKinds.GroupMembership.CONTENT_ITEM_TYPE, IDsString)
|
||||
val selection = "${ContactsContract.Data.RAW_CONTACT_ID} = ? AND ${ContactsContract.Data.MIMETYPE} = ? AND ${ContactsContract.Data.DATA1} IN ($IDsString)"
|
||||
val selectionArgs = arrayOf(contact.id.toString(), CommonDataKinds.GroupMembership.CONTENT_ITEM_TYPE)
|
||||
withSelection(selection, selectionArgs)
|
||||
operations.add(build())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue