Fixed display for starting with surname (#544)

This commit is contained in:
Agnieszka C
2023-03-09 20:16:35 +01:00
parent 2bb7a1debe
commit 6afb6f3220
12 changed files with 49 additions and 27 deletions

View File

@ -101,7 +101,7 @@ class RecentsHelper(private val context: Context) {
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
contactsNumbersMap[number] = contact.getNameToDisplay()
return@firstOrNull true
}
}