mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02: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)
|
sources.addAll(contentResolverAccounts)
|
||||||
|
|
||||||
if (sources.isEmpty() && activity.config.localAccountName.isEmpty() && activity.config.localAccountType.isEmpty()) {
|
if (sources.isEmpty() && activity.config.localAccountName.isEmpty() && activity.config.localAccountType.isEmpty()) {
|
||||||
|
Reference in New Issue
Block a user