renaming a parameter
This commit is contained in:
parent
3d24a84248
commit
aaaa18009a
|
@ -28,12 +28,12 @@ class ContactsHelper(val context: Context) {
|
||||||
private val BATCH_SIZE = 50
|
private val BATCH_SIZE = 50
|
||||||
private var displayContactSources = ArrayList<String>()
|
private var displayContactSources = ArrayList<String>()
|
||||||
|
|
||||||
fun getContacts(isExporting: Boolean = false, ignoredContactSources: HashSet<String> = HashSet(), callback: (ArrayList<Contact>) -> Unit) {
|
fun getContacts(getAll: Boolean = false, ignoredContactSources: HashSet<String> = HashSet(), callback: (ArrayList<Contact>) -> Unit) {
|
||||||
ensureBackgroundThread {
|
ensureBackgroundThread {
|
||||||
val contacts = SparseArray<Contact>()
|
val contacts = SparseArray<Contact>()
|
||||||
displayContactSources = context.getVisibleContactSources()
|
displayContactSources = context.getVisibleContactSources()
|
||||||
|
|
||||||
if (isExporting) {
|
if (getAll) {
|
||||||
displayContactSources = if (ignoredContactSources.isEmpty()) {
|
displayContactSources = if (ignoredContactSources.isEmpty()) {
|
||||||
context.getAllContactSources().map { it.getFullIdentifier() }.toMutableList() as ArrayList
|
context.getAllContactSources().map { it.getFullIdentifier() }.toMutableList() as ArrayList
|
||||||
} else {
|
} else {
|
||||||
|
@ -66,7 +66,7 @@ class ContactsHelper(val context: Context) {
|
||||||
contacts.valueAt(it)
|
contacts.valueAt(it)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ignoredContactSources.isEmpty() && context.config.filterDuplicates && !isExporting) {
|
if (ignoredContactSources.isEmpty() && context.config.filterDuplicates && !getAll) {
|
||||||
tempContacts = tempContacts.distinctBy {
|
tempContacts = tempContacts.distinctBy {
|
||||||
it.getHashToCompare()
|
it.getHashToCompare()
|
||||||
} as ArrayList<Contact>
|
} as ArrayList<Contact>
|
||||||
|
|
Loading…
Reference in New Issue