mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
fix #28, make the contacts beginning with the search string appear first
This commit is contained in:
@ -163,6 +163,11 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
|
|||||||
it.phoneNumbers.any { it.value.contains(text, true) } ||
|
it.phoneNumbers.any { it.value.contains(text, true) } ||
|
||||||
it.emails.any { it.value.contains(text, true) }
|
it.emails.any { it.value.contains(text, true) }
|
||||||
} as ArrayList
|
} as ArrayList
|
||||||
|
|
||||||
|
Contact.sorting = config.sorting
|
||||||
|
filtered.sort()
|
||||||
|
filtered.sortBy { !it.getFullName(startNameWithSurname).startsWith(text, true) }
|
||||||
|
|
||||||
updateItems(filtered)
|
updateItems(filtered)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user