mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
finish the action mode at changing the input at dialpad
This commit is contained in:
@ -96,6 +96,7 @@ class DialpadActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun dialpadValueChanged(text: String) {
|
private fun dialpadValueChanged(text: String) {
|
||||||
|
(dialpad_list.adapter as? ContactsAdapter)?.finishActMode()
|
||||||
val numericOnly = text.replace(PHONE_NUMBER_PATTERN.toRegex(), "")
|
val numericOnly = text.replace(PHONE_NUMBER_PATTERN.toRegex(), "")
|
||||||
val filtered = contacts.filter {
|
val filtered = contacts.filter {
|
||||||
it.phoneNumbers.any { (text.isNotEmpty() && it.value.contains(text)) || (numericOnly.isNotEmpty() && it.value.contains(numericOnly)) } ||
|
it.phoneNumbers.any { (text.isNotEmpty() && it.value.contains(text)) || (numericOnly.isNotEmpty() && it.value.contains(numericOnly)) } ||
|
||||||
|
Reference in New Issue
Block a user