From 8dd903a6fcc7fbbf99f2c3587b39ada91b488fd1 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 18 Sep 2020 22:05:09 +0200 Subject: [PATCH] fix #84, properly recognize private contact names at the call log --- .../com/simplemobiletools/dialer/fragments/RecentsFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/dialer/fragments/RecentsFragment.kt b/app/src/main/kotlin/com/simplemobiletools/dialer/fragments/RecentsFragment.kt index e97b2e04..0d9e6d51 100644 --- a/app/src/main/kotlin/com/simplemobiletools/dialer/fragments/RecentsFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/dialer/fragments/RecentsFragment.kt @@ -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