mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
use the new way of contact phone number fetching
This commit is contained in:
@ -90,8 +90,8 @@ class RecentsHelper(private val context: Context) {
|
||||
val normalizedNumber = number.normalizePhoneNumber()
|
||||
if (normalizedNumber!!.length >= COMPARABLE_PHONE_NUMBER_LENGTH) {
|
||||
name = contacts.firstOrNull { contact ->
|
||||
val curNumber = contact.phoneNumbers.first().normalizePhoneNumber()
|
||||
if (curNumber!!.length >= COMPARABLE_PHONE_NUMBER_LENGTH) {
|
||||
val curNumber = contact.phoneNumbers.first().normalizedNumber
|
||||
if (curNumber.length >= COMPARABLE_PHONE_NUMBER_LENGTH) {
|
||||
if (curNumber.substring(curNumber.length - COMPARABLE_PHONE_NUMBER_LENGTH) == normalizedNumber.substring(normalizedNumber.length - COMPARABLE_PHONE_NUMBER_LENGTH)) {
|
||||
contactsNumbersMap[number] = contact.name
|
||||
return@firstOrNull true
|
||||
|
Reference in New Issue
Block a user