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