mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-01-31 07:55:03 +01:00
normalize names at the dialpad letter search
This commit is contained in:
parent
2974d828a8
commit
d4d7592666
@ -173,8 +173,8 @@ class DialpadActivity : SimpleActivity() {
|
|||||||
val showLetters = config.showDialpadLetters
|
val showLetters = config.showDialpadLetters
|
||||||
(dialpad_list.adapter as? ContactsAdapter)?.finishActMode()
|
(dialpad_list.adapter as? ContactsAdapter)?.finishActMode()
|
||||||
val filtered = contacts.filter {
|
val filtered = contacts.filter {
|
||||||
val convertedName = PhoneNumberUtils.convertKeypadLettersToDigits(it.getNameToDisplay())
|
val convertedName = PhoneNumberUtils.convertKeypadLettersToDigits(it.getNameToDisplay().normalizeString())
|
||||||
val company = PhoneNumberUtils.convertKeypadLettersToDigits(it.getFullCompany())
|
val company = PhoneNumberUtils.convertKeypadLettersToDigits(it.getFullCompany().normalizeString())
|
||||||
it.doesContainPhoneNumber(text, showLetters) || (showLetters && (convertedName.contains(text, true) || company.contains(text, true)))
|
it.doesContainPhoneNumber(text, showLetters) || (showLetters && (convertedName.contains(text, true) || company.contains(text, true)))
|
||||||
}.sortedWith(compareBy {
|
}.sortedWith(compareBy {
|
||||||
if (showLetters) {
|
if (showLetters) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user