Skip to content

Commit d167e15

Browse files
committed
do not filter duplicates prematurely
1 parent f6c4e17 commit d167e15

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/ContactsHelper.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class ContactsHelper(val context: Context) {
5353

5454
val contactsSize = contacts.size()
5555
val showOnlyContactsWithNumbers = context.config.showOnlyContactsWithNumbers
56-
var tempContacts = ArrayList<Contact>(contactsSize)
56+
val tempContacts = ArrayList<Contact>(contactsSize)
5757
val resultContacts = ArrayList<Contact>(contactsSize)
5858

5959
(0 until contactsSize).filter {
@@ -67,10 +67,6 @@ class ContactsHelper(val context: Context) {
6767
}
6868

6969
if (ignoredContactSources.isEmpty() && !getAll) {
70-
tempContacts = tempContacts.distinctBy {
71-
it.getHashToCompare()
72-
} as ArrayList<Contact>
73-
7470
tempContacts.filter { displayContactSources.contains(it.source) }.groupBy { "${it.getNameToDisplay().toLowerCase()}${it.emails}" }.values.forEach { it ->
7571
if (it.size == 1) {
7672
resultContacts.add(it.first())

0 commit comments

Comments
 (0)