Skip to content

Commit fc837af

Browse files
committed
avoid showing both Phone and Phone Storage as available options
1 parent adcd335 commit fc837af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/ContactsHelper.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import com.simplemobiletools.contacts.pro.models.Email
2323
import com.simplemobiletools.contacts.pro.models.Event
2424
import com.simplemobiletools.contacts.pro.models.Organization
2525
import java.util.*
26-
import kotlin.collections.ArrayList
2726

2827
class ContactsHelper(val context: Context) {
2928
private val BATCH_SIZE = 50
@@ -811,8 +810,9 @@ class ContactsHelper(val context: Context) {
811810
}
812811

813812
var hadEmptyAccount = false
814-
val contentResolverAccounts = getContentResolverAccounts().filter {
815-
if (it.name.isEmpty() && it.type.isEmpty()) {
813+
val allAccounts = getContentResolverAccounts()
814+
val contentResolverAccounts = allAccounts.filter {
815+
if (it.name.isEmpty() && it.type.isEmpty() && allAccounts.none { it.name.lowercase(Locale.getDefault()) == "phone" }) {
816816
hadEmptyAccount = true
817817
}
818818

0 commit comments

Comments
 (0)