mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-02-14 10:30:46 +01:00
Merge pull request #589 from ismailnurudeen/fix/favourite-private-contacts
fix: show favourite private contacts
This commit is contained in:
commit
0fb7d4dbe7
@ -49,12 +49,14 @@ class FavoritesFragment(context: Context, attributeSet: AttributeSet) : MyViewPa
|
||||
}
|
||||
|
||||
override fun refreshItems(callback: (() -> Unit)?) {
|
||||
val privateCursor = context?.getMyContactsCursor(true, true)
|
||||
ContactsHelper(context).getContacts { contacts ->
|
||||
allContacts = contacts
|
||||
|
||||
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()) {
|
||||
allContacts.addAll(privateContacts)
|
||||
allContacts.sort()
|
||||
|
Loading…
x
Reference in New Issue
Block a user