normalize names at the dialpad letter search

This commit is contained in:
tibbi 2019-08-27 11:29:21 +02:00
parent 2974d828a8
commit d4d7592666

View File

@ -173,8 +173,8 @@ class DialpadActivity : SimpleActivity() {
val showLetters = config.showDialpadLetters
(dialpad_list.adapter as? ContactsAdapter)?.finishActMode()
val filtered = contacts.filter {
val convertedName = PhoneNumberUtils.convertKeypadLettersToDigits(it.getNameToDisplay())
val company = PhoneNumberUtils.convertKeypadLettersToDigits(it.getFullCompany())
val convertedName = PhoneNumberUtils.convertKeypadLettersToDigits(it.getNameToDisplay().normalizeString())
val company = PhoneNumberUtils.convertKeypadLettersToDigits(it.getFullCompany().normalizeString())
it.doesContainPhoneNumber(text, showLetters) || (showLetters && (convertedName.contains(text, true) || company.contains(text, true)))
}.sortedWith(compareBy {
if (showLetters) {