improve contact sorting at New Conversation, prefer names starting with letters
This commit is contained in:
parent
96e78e3ddc
commit
d98c1abb96
3 changed files with 24 additions and 7 deletions
|
|
@ -163,11 +163,7 @@ class NewConversationActivity : SimpleActivity() {
|
|||
contacts_letter_fastscroller.setupWithRecyclerView(contacts_list, { position ->
|
||||
try {
|
||||
val name = contacts[position].name
|
||||
var character = if (name.isNotEmpty()) name.substring(0, 1) else ""
|
||||
if (!character.areLettersOnly()) {
|
||||
character = "#"
|
||||
}
|
||||
|
||||
val character = if (name.isNotEmpty()) name.substring(0, 1) else ""
|
||||
FastScrollItemIndicator.Text(character.toUpperCase(Locale.getDefault()))
|
||||
} catch (e: Exception) {
|
||||
FastScrollItemIndicator.Text("")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue