Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #139 ignore white space character for search with dialpad numbers #214

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Honk2
Copy link

@Honk2 Honk2 commented Jul 21, 2024

What is it?

  • Bugfix
  • Feature
  • Codebase improvement

Description of the changes in your PR

When searching contacts using the dialpad, 1 is handled as space character.
Also the white space symbol |_| is displayed below the 1 on the dialpad.

Fixes the following issue(s)

Acknowledgement

@Aga-C
Copy link
Member

Aga-C commented Jul 21, 2024

It works, but I'm thinking it would be better to just ignore whitespaces while searching with numbers. Google Phone works this way, so I assume people are used to it. @naveensingh What do you think?

@naveensingh
Copy link
Member

naveensingh commented Jul 21, 2024

I think using 1 as a substitute for whitespace is quite arbitrary and no one would expect it (even with the "␣").

I'm thinking it would be better to just ignore whitespaces while searching with numbers

Agreed. The search itself should be more 'intelligent' and display any relevant results.

@Honk2
Copy link
Author

Honk2 commented Jul 21, 2024

Got your point.
I changed the commit accordingly.

@@ -368,7 +369,7 @@ class ContactsAdapter(
if (name.contains(textToHighlight, true)) {
name.highlightTextPart(textToHighlight, properPrimaryColor)
} else {
name.highlightTextFromNumbers(textToHighlight, properPrimaryColor)
name.highlightTextFromNumbers(textToHighlight.replace('1', ' '), properPrimaryColor)
Copy link
Member

@naveensingh naveensingh Jul 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this change is no longer needed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I just messed up the commits.

@Honk2 Honk2 changed the title Fixes #139 handle 1 als white space character for search Fixes #139 ignore white space character for search with dialpad numbers Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Character error on the keypad.
3 participants