From 0160f487117d917ef971836cf1a6dcdf2ff44eb8 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 16 Sep 2019 19:17:10 +0200 Subject: [PATCH] show only the proper contact sources at the View screen --- .../contacts/pro/activities/ViewContactActivity.kt | 3 ++- 1 file changed, 2 insertions(+), 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 f92de407..9c437aef 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 @@ -572,7 +572,8 @@ class ViewContactActivity : ContactActivity() { ContactsHelper(this).getDuplicatesOfContact(contact!!, false) { contacts -> ensureBackgroundThread { duplicateContacts.clear() - contacts.forEach { + val displayContactSources = getVisibleContactSources() + contacts.filter { displayContactSources.contains(it.source) }.forEach { val duplicate = ContactsHelper(this).getContactWithId(it.id, it.isPrivate()) if (duplicate != null) { duplicateContacts.add(duplicate)