search at Notes and addresses too

This commit is contained in:
tibbi 2018-03-04 10:07:02 +01:00
parent 9ebb72b1b2
commit 1bd9355d92

View file

@ -171,7 +171,9 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
val filtered = contactsIgnoringSearch.filter {
it.getFullName(startNameWithSurname).contains(text, true) ||
it.phoneNumbers.any { it.value.contains(text, true) } ||
it.emails.any { it.value.contains(text, true) }
it.emails.any { it.value.contains(text, true) } ||
it.addresses.any { it.value.contains(text, true) } ||
it.notes.contains(text, true)
} as ArrayList
Contact.sorting = config.sorting
@ -188,7 +190,7 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
}
fun onSearchOpened() {
contactsIgnoringSearch = (fragment_list?.adapter as? ContactsAdapter)?.contactItems as? ArrayList ?: ArrayList()
contactsIgnoringSearch = (fragment_list?.adapter as? ContactsAdapter)?.contactItems ?: ArrayList()
}
fun onSearchClosed() {