get all contacts without merging duplicates in some cases
This commit is contained in:
parent
c07e70ab1c
commit
523dfc039b
|
@ -176,7 +176,7 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
|
|||
val positions = getSelectedItemPositions()
|
||||
contactItems.removeAll(contactsToRemove)
|
||||
|
||||
ContactsHelper(activity).getContacts { allContacts ->
|
||||
ContactsHelper(activity).getContacts(true) { allContacts ->
|
||||
ensureBackgroundThread {
|
||||
contactsToRemove.forEach {
|
||||
val contactToRemove = it
|
||||
|
|
|
@ -1572,7 +1572,7 @@ class ContactsHelper(val context: Context) {
|
|||
|
||||
fun getDuplicatesOfContact(contact: Contact, addOriginal: Boolean, callback: (ArrayList<Contact>) -> Unit) {
|
||||
ensureBackgroundThread {
|
||||
getContacts { contacts ->
|
||||
getContacts(true) { contacts ->
|
||||
val duplicates = contacts.filter { it.id != contact.id && it.getHashToCompare() == contact.getHashToCompare() }.toMutableList() as ArrayList<Contact>
|
||||
if (addOriginal) {
|
||||
duplicates.add(contact)
|
||||
|
|
Loading…
Reference in New Issue