diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/ContactsHelper.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/ContactsHelper.kt index b8f461ee..8085c5ed 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/ContactsHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/ContactsHelper.kt @@ -28,12 +28,12 @@ class ContactsHelper(val context: Context) { private val BATCH_SIZE = 50 private var displayContactSources = ArrayList() - fun getContacts(isExporting: Boolean = false, ignoredContactSources: HashSet = HashSet(), callback: (ArrayList) -> Unit) { + fun getContacts(getAll: Boolean = false, ignoredContactSources: HashSet = HashSet(), callback: (ArrayList) -> Unit) { ensureBackgroundThread { val contacts = SparseArray() displayContactSources = context.getVisibleContactSources() - if (isExporting) { + if (getAll) { displayContactSources = if (ignoredContactSources.isEmpty()) { context.getAllContactSources().map { it.getFullIdentifier() }.toMutableList() as ArrayList } else { @@ -66,7 +66,7 @@ class ContactsHelper(val context: Context) { contacts.valueAt(it) } - if (ignoredContactSources.isEmpty() && context.config.filterDuplicates && !isExporting) { + if (ignoredContactSources.isEmpty() && context.config.filterDuplicates && !getAll) { tempContacts = tempContacts.distinctBy { it.getHashToCompare() } as ArrayList