-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Query search against application package name in addition to label. #958
base: main
Are you sure you want to change the base?
Conversation
…ell as label to help with i18n.
@@ -222,7 +222,7 @@ internal class AppRepositoryImpl( | |||
appResults.addAll(apps) | |||
} else { | |||
appResults.addAll(apps.filter { | |||
matches(it.label, query) | |||
matches(it.label, query) || matches(it.componentName.packageName.split('.').last(), query) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why only the last part?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of all the com
prefixes and company names, e.g. thus any com
search queries will break.
I'm thinking about using English (or default) label instead by loading context, what do you think? Although non-English apps may not be indexed, however in that situation it may not be a problem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Package names in general are pretty inconsistent (this is the reason I don't use them already). Loading the English label is certainly the better approach, as long as you cache the English label (just add an internal field to LauncherApp
and store it alongside the app)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for late response, but tinkering around with it it looks like loading Context
with different locale config doesn't actually load different labels for apps, since it's being handled by PackageManager.getText
which, as I understand, is manufacturer dependent. I'll see if I can retrieve it from adb/manifest somehow, but it looks like package name is the way to go
Is it possible to make the shortcuts on original desktop searchable and selectable? |
AFAIK the new shortcuts should represent 1 to 1 mapping in Kvaesitso launcher. Can you please elaborate and/or provide example? |
When searching apps, compare query against the original app name as well as label to help with i18n. For example, Google suite apps, such as Google Maps, have localised labels in different languages. Google Maps name in Russian is
Карты
, which cause it to not be shown when querying formap
. Current behaviour:Expected behaviour (after this pull request):