mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
search the given string at phone numbers too, not just names
This commit is contained in:
@@ -154,7 +154,10 @@ class ContactsFragment(context: Context, attributeSet: AttributeSet) : MyViewPag
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun onSearchQueryChanged(text: String) {
|
fun onSearchQueryChanged(text: String) {
|
||||||
val contacts = allContacts.filter { it.name.contains(text, true) }.toMutableList() as ArrayList<SimpleContact>
|
val contacts = allContacts.filter {
|
||||||
|
it.name.contains(text, true) || it.doesContainPhoneNumber(text)
|
||||||
|
}.toMutableList() as ArrayList<SimpleContact>
|
||||||
|
|
||||||
(fragment_list.adapter as? ContactsAdapter)?.updateItems(contacts, text)
|
(fragment_list.adapter as? ContactsAdapter)?.updateItems(contacts, text)
|
||||||
setupLetterFastscroller(contacts)
|
setupLetterFastscroller(contacts)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user