mirror of
https://github.com/FossifyOrg/Contacts.git
synced 2026-05-14 01:26:48 -04:00
avoid creating Account object with empty name or type
This commit is contained in:
@@ -698,7 +698,9 @@ class ContactsHelper(val activity: Activity) {
|
||||
}
|
||||
}
|
||||
|
||||
val contentResolverAccounts = getContentResolverAccounts().filter { !accounts.contains(Account(it.name, it.type)) }
|
||||
val contentResolverAccounts = getContentResolverAccounts().filter {
|
||||
it.name.isNotEmpty() && it.type.isNotEmpty() && !accounts.contains(Account(it.name, it.type))
|
||||
}
|
||||
sources.addAll(contentResolverAccounts)
|
||||
|
||||
if (sources.isEmpty() && activity.config.localAccountName.isEmpty() && activity.config.localAccountType.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user