improve search at new conversation, ignore accents
This commit is contained in:
parent
f834e4a698
commit
e5bd51ed24
1 changed files with 4 additions and 1 deletions
|
|
@ -64,7 +64,10 @@ class NewConversationActivity : SimpleActivity() {
|
||||||
val searchString = it
|
val searchString = it
|
||||||
val filteredContacts = ArrayList<SimpleContact>()
|
val filteredContacts = ArrayList<SimpleContact>()
|
||||||
allContacts.forEach {
|
allContacts.forEach {
|
||||||
if (it.phoneNumbers.any { it.contains(searchString, true) } || it.name.contains(searchString, true)) {
|
if (it.phoneNumbers.any { it.contains(searchString, true) } ||
|
||||||
|
it.name.contains(searchString, true) ||
|
||||||
|
it.name.contains(searchString.normalizeString(), true) ||
|
||||||
|
it.name.normalizeString().contains(searchString, true)) {
|
||||||
filteredContacts.add(it)
|
filteredContacts.add(it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue