mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 19:38:52 +01:00
Sort contacts with letter names first
This commit is contained in:
@@ -62,7 +62,7 @@ class ContactAdapter @Inject constructor() : QkAdapter<Contact>() {
|
||||
|
||||
view.index.text = if (contact.name.getOrNull(0)?.isLetter() == true) contact.name[0].toString() else "#"
|
||||
view.index.isVisible = prevContact == null ||
|
||||
(contact.name[0].isLetter() && contact.name[0] != prevContact.name[0]) ||
|
||||
(contact.name[0].isLetter() && !contact.name[0].equals(prevContact.name[0], ignoreCase = true)) ||
|
||||
(!contact.name[0].isLetter() && prevContact.name[0].isLetter())
|
||||
|
||||
view.avatar.setContact(contact)
|
||||
|
||||
Reference in New Issue
Block a user