mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
Merge pull request #941 from Aga-C/fix-default-indicator
Fixed default number indicator (#939)
This commit is contained in:
@ -351,7 +351,7 @@ class ViewContactActivity : ContactActivity() {
|
|||||||
val duplicateContactsDefaultNumbers = duplicateContacts.flatMap { it.phoneNumbers }.filter { it.isPrimary }
|
val duplicateContactsDefaultNumbers = duplicateContacts.flatMap { it.phoneNumbers }.filter { it.isPrimary }
|
||||||
val defaultNumbers = (contactDefaultsNumbers + duplicateContactsDefaultNumbers).toSet()
|
val defaultNumbers = (contactDefaultsNumbers + duplicateContactsDefaultNumbers).toSet()
|
||||||
|
|
||||||
if (defaultNumbers.size > 1) {
|
if (defaultNumbers.size > 1 && defaultNumbers.distinctBy { it.normalizedNumber }.size > 1) {
|
||||||
phoneNumbers.forEach { it.isPrimary = false }
|
phoneNumbers.forEach { it.isPrimary = false }
|
||||||
} else if (defaultNumbers.size == 1) {
|
} else if (defaultNumbers.size == 1) {
|
||||||
if (mergeDuplicate) {
|
if (mergeDuplicate) {
|
||||||
|
Reference in New Issue
Block a user