show only the proper contact sources at the View screen

This commit is contained in:
tibbi 2019-09-16 19:17:10 +02:00
parent d167e15681
commit 0160f48711

View File

@ -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)