mirror of
https://github.com/FossifyOrg/Contacts.git
synced 2026-02-04 12:41:54 -05: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