search at Notes and addresses too
This commit is contained in:
parent
9ebb72b1b2
commit
1bd9355d92
|
@ -171,7 +171,9 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
|
||||||
val filtered = contactsIgnoringSearch.filter {
|
val filtered = contactsIgnoringSearch.filter {
|
||||||
it.getFullName(startNameWithSurname).contains(text, true) ||
|
it.getFullName(startNameWithSurname).contains(text, true) ||
|
||||||
it.phoneNumbers.any { it.value.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
|
} as ArrayList
|
||||||
|
|
||||||
Contact.sorting = config.sorting
|
Contact.sorting = config.sorting
|
||||||
|
@ -188,7 +190,7 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun onSearchOpened() {
|
fun onSearchOpened() {
|
||||||
contactsIgnoringSearch = (fragment_list?.adapter as? ContactsAdapter)?.contactItems as? ArrayList ?: ArrayList()
|
contactsIgnoringSearch = (fragment_list?.adapter as? ContactsAdapter)?.contactItems ?: ArrayList()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun onSearchClosed() {
|
fun onSearchClosed() {
|
||||||
|
|
Loading…
Reference in New Issue