Skip to content

Commit faf6a85

Browse files
committed
fix a glitch with casual Phone Storage not being visible
1 parent 4d99408 commit faf6a85

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,12 +810,17 @@ class ContactsHelper(val context: Context) {
810810
}
811811
}
812812

813+
var hadEmptyAccount = false
813814
val contentResolverAccounts = getContentResolverAccounts().filter {
815+
if (it.name.isEmpty() && it.type.isEmpty()) {
816+
hadEmptyAccount = true
817+
}
818+
814819
it.name.isNotEmpty() && it.type.isNotEmpty() && !accounts.contains(Account(it.name, it.type))
815820
}
816821
sources.addAll(contentResolverAccounts)
817822

818-
if (!sources.any { it.type.startsWith("com.google") || it.type.startsWith("com.android") || it.type.startsWith("com.qualcomm") }) {
823+
if (hadEmptyAccount) {
819824
sources.add(ContactSource("", "", context.getString(R.string.phone_storage)))
820825
}
821826

0 commit comments

Comments
 (0)