mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
Added initial all sources selection if none selected previously
This commit is contained in:
@ -116,9 +116,13 @@ class ManageAutoBackupsDialog(private val activity: SimpleActivity, onSuccess: (
|
||||
return
|
||||
}
|
||||
|
||||
if (selectedContactSources.isEmpty()) {
|
||||
selectedContactSources = contactSources.map { it.name }.toSet()
|
||||
}
|
||||
|
||||
val contactSourcesWithCount = mutableListOf<ContactSource>()
|
||||
for (source in contactSources) {
|
||||
val count = contacts.filter { it.source == source.name }.count()
|
||||
val count = contacts.count { it.source == source.name }
|
||||
contactSourcesWithCount.add(source.copy(count = count))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user