finish the action mode at changing the input at dialpad

This commit is contained in:
tibbi 2018-09-25 14:11:29 +02:00
parent dac59dabcf
commit 8ae60448f4
1 changed files with 1 additions and 0 deletions

View File

@ -96,6 +96,7 @@ class DialpadActivity : SimpleActivity() {
}
private fun dialpadValueChanged(text: String) {
(dialpad_list.adapter as? ContactsAdapter)?.finishActMode()
val numericOnly = text.replace(PHONE_NUMBER_PATTERN.toRegex(), "")
val filtered = contacts.filter {
it.phoneNumbers.any { (text.isNotEmpty() && it.value.contains(text)) || (numericOnly.isNotEmpty() && it.value.contains(numericOnly)) } ||