mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-13 01:50:44 +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.Event
|
||||||
import com.simplemobiletools.contacts.pro.models.Organization
|
import com.simplemobiletools.contacts.pro.models.Organization
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import kotlin.collections.ArrayList
|
|
||||||
|
|
||||||
class ContactsHelper(val context: Context) {
|
class ContactsHelper(val context: Context) {
|
||||||
private val BATCH_SIZE = 50
|
private val BATCH_SIZE = 50
|
||||||
@ -811,8 +810,9 @@ class ContactsHelper(val context: Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var hadEmptyAccount = false
|
var hadEmptyAccount = false
|
||||||
val contentResolverAccounts = getContentResolverAccounts().filter {
|
val allAccounts = getContentResolverAccounts()
|
||||||
if (it.name.isEmpty() && it.type.isEmpty()) {
|
val contentResolverAccounts = allAccounts.filter {
|
||||||
|
if (it.name.isEmpty() && it.type.isEmpty() && allAccounts.none { it.name.lowercase(Locale.getDefault()) == "phone" }) {
|
||||||
hadEmptyAccount = true
|
hadEmptyAccount = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user