fix #28, make the contacts beginning with the search string appear first

This commit is contained in:
tibbi 2018-01-03 12:11:25 +01:00
parent 2b636f7240
commit a1a2573047
1 changed files with 5 additions and 0 deletions

View File

@ -163,6 +163,11 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
it.phoneNumbers.any { it.value.contains(text, true) } ||
it.emails.any { it.value.contains(text, true) }
} as ArrayList
Contact.sorting = config.sorting
filtered.sort()
filtered.sortBy { !it.getFullName(startNameWithSurname).startsWith(text, true) }
updateItems(filtered)
}
}