mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
sort contacts directly after fetching, while still on a background thread
This commit is contained in:
@ -108,9 +108,6 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
|
||||
config.lastUsedContactSource = grouped?.key ?: ""
|
||||
}
|
||||
|
||||
Contact.sorting = config.sorting
|
||||
Contact.startWithSurname = config.startNameWithSurname
|
||||
contacts.sort()
|
||||
allContacts = contacts
|
||||
|
||||
val filtered = when {
|
||||
@ -253,9 +250,6 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
|
||||
it.websites.any { it.contains(text, true) }
|
||||
} as ArrayList
|
||||
|
||||
Contact.sorting = config.sorting
|
||||
Contact.startWithSurname = config.startNameWithSurname
|
||||
filtered.sort()
|
||||
filtered.sortBy { !getProperText(it.getNameToDisplay(), shouldNormalize).startsWith(text, true) }
|
||||
|
||||
if (filtered.isEmpty() && this@MyViewPagerFragment is FavoritesFragment) {
|
||||
|
Reference in New Issue
Block a user