sort contacts only after filtering
This commit is contained in:
parent
4000641022
commit
b57884ab8e
|
@ -88,9 +88,6 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
|
|||
config.lastUsedContactSource = grouped?.key ?: ""
|
||||
}
|
||||
|
||||
Contact.sorting = config.sorting
|
||||
contacts.sort()
|
||||
|
||||
contacts = if (this is FavoritesFragment) {
|
||||
val favorites = config.favorites
|
||||
contacts.filter { favorites.contains(it.id.toString()) } as ArrayList<Contact>
|
||||
|
@ -103,6 +100,9 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
|
|||
}
|
||||
}
|
||||
|
||||
Contact.sorting = config.sorting
|
||||
contacts.sort()
|
||||
|
||||
if (contacts.hashCode() != lastHashCode) {
|
||||
lastHashCode = contacts.hashCode()
|
||||
activity!!.runOnUiThread {
|
||||
|
|
Loading…
Reference in New Issue