fix #84, properly recognize private contact names at the call log

This commit is contained in:
tibbi
2020-09-18 22:05:09 +02:00
parent a8cdf49dbc
commit 8dd903a6fc

View File

@ -50,7 +50,7 @@ class RecentsFragment(context: Context, attributeSet: AttributeSet) : MyViewPage
recents.filter { it.phoneNumber == it.name }.forEach { recent ->
var wasNameFilled = false
if (privateContacts.isNotEmpty()) {
val privateContact = privateContacts.firstOrNull { it.phoneNumbers.first() == recent.phoneNumber }
val privateContact = privateContacts.firstOrNull { it.doesContainPhoneNumber(recent.phoneNumber) }
if (privateContact != null) {
recent.name = privateContact.name
wasNameFilled = true