mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-03-30 11:00:19 +02:00
fix some filtering issues, show more contacts rather than less
This commit is contained in:
parent
a06ed027cd
commit
42ff471748
@ -66,7 +66,7 @@ class ContactsHelper(val context: Context) {
|
||||
it.getHashToCompare()
|
||||
} as ArrayList<Contact>
|
||||
|
||||
tempContacts.groupBy { "${it.getNameToDisplay().toLowerCase()}${it.emails}" }.values.forEach {
|
||||
tempContacts.filter { displayContactSources.contains(it.source) }.groupBy { "${it.getNameToDisplay().toLowerCase()}${it.emails}" }.values.forEach { it ->
|
||||
if (it.size == 1) {
|
||||
resultContacts.add(it.first())
|
||||
} else {
|
||||
|
@ -112,9 +112,8 @@ data class Contact(var id: Int, var prefix: String, var firstName: String, var m
|
||||
emails.mapTo(newEmails) { Email(it.value, 0, "") }
|
||||
|
||||
return copy(id = 0, prefix = "", firstName = getNameToDisplay().toLowerCase(), middleName = "", surname = "", suffix = "", nickname = "", photoUri = "",
|
||||
phoneNumbers = ArrayList(), events = ArrayList(), addresses = ArrayList(), emails = newEmails, source = "", starred = 0,
|
||||
contactId = 0, thumbnailUri = "", notes = "", groups = ArrayList(), websites = ArrayList(), organization = Organization("", ""),
|
||||
IMs = ArrayList()).toString()
|
||||
phoneNumbers = ArrayList(), events = ArrayList(), addresses = ArrayList(), emails = newEmails, starred = 0, contactId = 0,
|
||||
thumbnailUri = "", notes = "", groups = ArrayList(), websites = ArrayList(), organization = Organization("", ""), IMs = ArrayList()).toString()
|
||||
}
|
||||
|
||||
fun getHashToCompare() = getStringToCompare().hashCode()
|
||||
|
Loading…
x
Reference in New Issue
Block a user