mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
fix: show favourite private contacts
This commit is contained in:
@@ -49,12 +49,14 @@ class FavoritesFragment(context: Context, attributeSet: AttributeSet) : MyViewPa
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun refreshItems(callback: (() -> Unit)?) {
|
override fun refreshItems(callback: (() -> Unit)?) {
|
||||||
val privateCursor = context?.getMyContactsCursor(true, true)
|
|
||||||
ContactsHelper(context).getContacts { contacts ->
|
ContactsHelper(context).getContacts { contacts ->
|
||||||
allContacts = contacts
|
allContacts = contacts
|
||||||
|
|
||||||
if (SMT_PRIVATE !in context.baseConfig.ignoredContactSources) {
|
if (SMT_PRIVATE !in context.baseConfig.ignoredContactSources) {
|
||||||
val privateContacts = MyContactsContentProvider.getContacts(context, privateCursor)
|
val privateCursor = context?.getMyContactsCursor(true, true)
|
||||||
|
val privateContacts = MyContactsContentProvider.getContacts(context, privateCursor).map {
|
||||||
|
it.copy(starred = 1)
|
||||||
|
}
|
||||||
if (privateContacts.isNotEmpty()) {
|
if (privateContacts.isNotEmpty()) {
|
||||||
allContacts.addAll(privateContacts)
|
allContacts.addAll(privateContacts)
|
||||||
allContacts.sort()
|
allContacts.sort()
|
||||||
|
Reference in New Issue
Block a user