check contact real phone numbers too, not just the cleared ones
This commit is contained in:
parent
2beb5eb3a6
commit
2aadd93fa6
1 changed files with 4 additions and 1 deletions
|
|
@ -94,6 +94,9 @@ class DialpadActivity : SimpleActivity() {
|
||||||
|
|
||||||
private fun dialpadValueChanged(text: String) {
|
private fun dialpadValueChanged(text: String) {
|
||||||
val numericOnly = text.replace(PHONE_NUMBER_PATTERN.toRegex(), "")
|
val numericOnly = text.replace(PHONE_NUMBER_PATTERN.toRegex(), "")
|
||||||
val filtered = contacts.filter { it.cleanPhoneNumbers.any { it.value.contains(text) || it.value.contains(numericOnly) } }
|
val filtered = contacts.filter {
|
||||||
|
it.phoneNumbers.any { it.value.contains(text) || it.value.contains(numericOnly) } ||
|
||||||
|
it.cleanPhoneNumbers.any { it.value.contains(text) || it.value.contains(numericOnly) }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue