mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-02 08:56:50 +01:00
avoid showing both Phone and Phone Storage as available options
This commit is contained in:
parent
adcd33566c
commit
fc837af84f
@ -23,7 +23,6 @@ import com.simplemobiletools.contacts.pro.models.Email
|
||||
import com.simplemobiletools.contacts.pro.models.Event
|
||||
import com.simplemobiletools.contacts.pro.models.Organization
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
|
||||
class ContactsHelper(val context: Context) {
|
||||
private val BATCH_SIZE = 50
|
||||
@ -811,8 +810,9 @@ class ContactsHelper(val context: Context) {
|
||||
}
|
||||
|
||||
var hadEmptyAccount = false
|
||||
val contentResolverAccounts = getContentResolverAccounts().filter {
|
||||
if (it.name.isEmpty() && it.type.isEmpty()) {
|
||||
val allAccounts = getContentResolverAccounts()
|
||||
val contentResolverAccounts = allAccounts.filter {
|
||||
if (it.name.isEmpty() && it.type.isEmpty() && allAccounts.none { it.name.lowercase(Locale.getDefault()) == "phone" }) {
|
||||
hadEmptyAccount = true
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user