Update SimpleContact.kt
This commit is contained in:
parent
cde3a3a4fb
commit
4b7bd893ab
1 changed files with 4 additions and 4 deletions
|
@ -31,11 +31,11 @@ data class SimpleContact(
|
|||
return if (text.isNotEmpty()) {
|
||||
val normalizedText = text.normalizePhoneNumber()
|
||||
if (normalizedText.isEmpty()) {
|
||||
phoneNumbers.mapNotNull { it.normalizedNumber }.any { phoneNumber ->
|
||||
phoneNumbers.map { it.normalizedNumber }.any { phoneNumber ->
|
||||
phoneNumber.contains(text)
|
||||
}
|
||||
} else {
|
||||
phoneNumbers.mapNotNull { it.normalizedNumber }.any { phoneNumber ->
|
||||
phoneNumbers.map { it.normalizedNumber }.any { phoneNumber ->
|
||||
PhoneNumberUtils.compare(phoneNumber.normalizePhoneNumber(), normalizedText) ||
|
||||
phoneNumber.contains(text) ||
|
||||
phoneNumber.normalizePhoneNumber().contains(normalizedText) ||
|
||||
|
@ -51,11 +51,11 @@ data class SimpleContact(
|
|||
return if (text.isNotEmpty()) {
|
||||
val normalizedText = text.normalizePhoneNumber()
|
||||
if (normalizedText.isEmpty()) {
|
||||
phoneNumbers.mapNotNull { it.normalizedNumber }.any { phoneNumber ->
|
||||
phoneNumbers.map { it.normalizedNumber }.any { phoneNumber ->
|
||||
phoneNumber == text
|
||||
}
|
||||
} else {
|
||||
phoneNumbers.mapNotNull { it.normalizedNumber }.any { phoneNumber ->
|
||||
phoneNumbers.map { it.normalizedNumber }.any { phoneNumber ->
|
||||
PhoneNumberUtils.compare(phoneNumber.normalizePhoneNumber(), normalizedText) ||
|
||||
phoneNumber == text ||
|
||||
phoneNumber.normalizePhoneNumber() == normalizedText ||
|
||||
|
|
Loading…
Reference in a new issue