Skip to content

add toggle to demote disabled and suspended apps - #2636

Open
druneau wants to merge 1 commit into
Neamar:masterfrom
druneau:feat-demote-disabled-toggle
Open

add toggle to demote disabled and suspended apps#2636
druneau wants to merge 1 commit into
Neamar:masterfrom
druneau:feat-demote-disabled-toggle

Conversation

@druneau

@druneau druneau commented Jul 18, 2026

Copy link
Copy Markdown

KISS currently automatically demotes suspended and disabled apps from search results. This PR adds the ability to toggle this behaviour "off".

I added this for myself because i use digital well being features to basically suspend almost all apps after 5 minutes. And this feature allows me to quickly open them up through KISS search restuls when required.

Tested on google pixel 9a.

AI was used to make the changes.

if (canAddToHistory()) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean demoteDisabled = prefs.getBoolean("demote-disabled-apps", true);
if (canAddToHistory() || (!demoteDisabled && pojo.isDisabled())) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why is this necessary?

From option itself i would not expect this functionality to be changed too.
Only priority of results should change IMO.

if (pojo.isDisabled()) {
// Give penalty for disabled items, these should not be preferred
pojo.relevance -= 200;
if (demoteDisabled) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please don't forget about else branch.

Condition should be same as in HistorySearcher to have same behaviour as when isDisabled returns false.

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.

2 participants