From 6c52480c3acf531a8550448496bbb7aa27c5d69e Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 5 Jul 2018 14:43:57 +0200 Subject: [PATCH] ignore events and addresses at filtering duplicates --- .../com/simplemobiletools/contacts/models/Contact.kt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/models/Contact.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/models/Contact.kt index a5a95c7a..85b448fd 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/models/Contact.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/models/Contact.kt @@ -87,17 +87,11 @@ data class Contact(val id: Int, var prefix: String, var firstName: String, var m val newPhoneNumbers = ArrayList() phoneNumbers.mapTo(newPhoneNumbers) { PhoneNumber(it.value.replace(pattern, ""), 0) } - val newEvents = ArrayList() - events.mapTo(newEvents) { Event(it.value.replace(pattern, ""), 0) } - - val newAddresses = ArrayList
() - addresses.mapTo(newAddresses) { Address(it.value, 0) } - val newEmails = ArrayList() emails.mapTo(newEmails) { Email(it.value, 0) } return copy(id = 0, prefix = "", firstName = getFullName().toLowerCase(), middleName = "", surname = "", suffix = "", photoUri = "", - phoneNumbers = newPhoneNumbers, events = newEvents, addresses = newAddresses, emails = newEmails, source = "", starred = 0, + phoneNumbers = newPhoneNumbers, events = ArrayList(), addresses = ArrayList(), emails = newEmails, source = "", starred = 0, contactId = 0, thumbnailUri = "", notes = "", groups = ArrayList(), websites = ArrayList(), organization = Organization("", "")).hashCode() } }