Skip to content

Commit f11f23b

Browse files
committed
use only contact name at merging duplicates, not email
1 parent 0160f48 commit f11f23b

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class ContactsHelper(val context: Context) {
6767
}
6868

6969
if (ignoredContactSources.isEmpty() && !getAll) {
70-
tempContacts.filter { displayContactSources.contains(it.source) }.groupBy { "${it.getNameToDisplay().toLowerCase()}${it.emails}" }.values.forEach { it ->
70+
tempContacts.filter { displayContactSources.contains(it.source) }.groupBy { it.getNameToDisplay().toLowerCase()}.values.forEach { it ->
7171
if (it.size == 1) {
7272
resultContacts.add(it.first())
7373
} else {

app/src/main/kotlin/com/simplemobiletools/contacts/pro/models/Contact.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,8 @@ data class Contact(var id: Int, var prefix: String, var firstName: String, var m
108108
}
109109

110110
fun getStringToCompare(): String {
111-
val newEmails = ArrayList<Email>()
112-
emails.mapTo(newEmails) { Email(it.value, 0, "") }
113-
114111
return copy(id = 0, prefix = "", firstName = getNameToDisplay().toLowerCase(), middleName = "", surname = "", suffix = "", nickname = "", photoUri = "",
115-
phoneNumbers = ArrayList(), events = ArrayList(), source = "", addresses = ArrayList(), emails = newEmails, starred = 0, contactId = 0,
112+
phoneNumbers = ArrayList(), emails = ArrayList(), events = ArrayList(), source = "", addresses = ArrayList(), starred = 0, contactId = 0,
116113
thumbnailUri = "", notes = "", groups = ArrayList(), websites = ArrayList(), organization = Organization("", ""), IMs = ArrayList()).toString()
117114
}
118115

0 commit comments

Comments
 (0)