From cdd4391843a27db1c92cd8ea120e2b54e1f4d143 Mon Sep 17 00:00:00 2001 From: Agnieszka C <85929121+Aga-C@users.noreply.github.com> Date: Thu, 9 Feb 2023 20:13:09 +0100 Subject: [PATCH] Fixed default number indicator (#939) --- .../contacts/pro/activities/ViewContactActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/ViewContactActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/ViewContactActivity.kt index 44c9fbed..a607d341 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/ViewContactActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/ViewContactActivity.kt @@ -351,7 +351,7 @@ class ViewContactActivity : ContactActivity() { val duplicateContactsDefaultNumbers = duplicateContacts.flatMap { it.phoneNumbers }.filter { it.isPrimary } val defaultNumbers = (contactDefaultsNumbers + duplicateContactsDefaultNumbers).toSet() - if (defaultNumbers.size > 1) { + if (defaultNumbers.size > 1 && defaultNumbers.distinctBy { it.normalizedNumber }.size > 1) { phoneNumbers.forEach { it.isPrimary = false } } else if (defaultNumbers.size == 1) { if (mergeDuplicate) {