ignore events and addresses at filtering duplicates
This commit is contained in:
parent
4e71991822
commit
6c52480c3a
|
@ -87,17 +87,11 @@ data class Contact(val id: Int, var prefix: String, var firstName: String, var m
|
||||||
val newPhoneNumbers = ArrayList<PhoneNumber>()
|
val newPhoneNumbers = ArrayList<PhoneNumber>()
|
||||||
phoneNumbers.mapTo(newPhoneNumbers) { PhoneNumber(it.value.replace(pattern, ""), 0) }
|
phoneNumbers.mapTo(newPhoneNumbers) { PhoneNumber(it.value.replace(pattern, ""), 0) }
|
||||||
|
|
||||||
val newEvents = ArrayList<Event>()
|
|
||||||
events.mapTo(newEvents) { Event(it.value.replace(pattern, ""), 0) }
|
|
||||||
|
|
||||||
val newAddresses = ArrayList<Address>()
|
|
||||||
addresses.mapTo(newAddresses) { Address(it.value, 0) }
|
|
||||||
|
|
||||||
val newEmails = ArrayList<Email>()
|
val newEmails = ArrayList<Email>()
|
||||||
emails.mapTo(newEmails) { Email(it.value, 0) }
|
emails.mapTo(newEmails) { Email(it.value, 0) }
|
||||||
|
|
||||||
return copy(id = 0, prefix = "", firstName = getFullName().toLowerCase(), middleName = "", surname = "", suffix = "", photoUri = "",
|
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()
|
contactId = 0, thumbnailUri = "", notes = "", groups = ArrayList(), websites = ArrayList(), organization = Organization("", "")).hashCode()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue