mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-03-27 16:40:03 +01:00
check contact real phone numbers too, not just the cleared ones
This commit is contained in:
parent
2beb5eb3a6
commit
2aadd93fa6
@ -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…
x
Reference in New Issue
Block a user