Open Glitchy-Tozier opened 2 years ago
Good catch! But it's not really a bug, and I'm not too sure how to fix it 🤔
The reason why "F-Droid" isn't there with "fdr" is the "-" in "F-Droid". See, the app tries to match the input against the app names by calculating the Hamming distance between the two strings (the app name gets cut to the length of the input). This is done to allow one - but just one - mistyping.
So "fd" is matching "F-" because there's just one difference. "fdr" doesn't match "F-D" becaue there are two differences - and I allow just one.
Allowing more than one difference would give you irrelevant matches. Allowing no difference would require you to always type correctly.
Now, we may drop the minus "-" from app names when matching and make "fdr" match. But another user may type "F-D" what wouldnt match "FDr" 😬 So I'm not really sure what to do here 😉
A last option (the one i expected) is this:
Check whether those characters exist in the correct order. If yes, show app.
It's the way KISS launcher works. Screenshot:
I understand that this might give a lot of false positives (see the second app), but do you think it could be viable? The results could be sorted according to their hamming-distance 🤔
Well, yes, this can be done for sure. I will give it a try.
Let me know how it turns out! :)
Not sure what's the issue here but this is what is happening: There is an app called "F-Droid". I'm trying to search for it.
If I type "fd", i can find it. (Great) If I type "fdr", it's not found. (Weird)
This seems like a bug to me, and I suggest doing something about it.
Screenshots: