From 3804d2f00bff6b265494d8bba38fa5c28b2de9de Mon Sep 17 00:00:00 2001 From: Jon Rogers <67245+devnullvoid@users.noreply.github.com> Date: Mon, 23 Mar 2026 09:25:20 -0400 Subject: [PATCH] fix(Scorer): honour _preScored for no-query when value exceeds typeBonus (#2065) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plugin items can set _preScored to signal a priority boost (e.g. recently used items). Previously _preScored was only respected when a search query was active, so no-query default lists always fell back to typeBonus+frecency scoring, making plugin-controlled ordering impossible. Change the condition from: if (query && item._preScored !== undefined) to: if (item._preScored !== undefined && (query || item._preScored > 900)) This respects _preScored in no-query mode only when the value exceeds 900 (the plugin typeBonus), which avoids changing behaviour for "all" mode items whose _preScored is set to 900-j by the controller (≤ 900). Items without _preScored set continue to use the existing typeBonus + frecency formula. --- quickshell/Modals/DankLauncherV2/Scorer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickshell/Modals/DankLauncherV2/Scorer.js b/quickshell/Modals/DankLauncherV2/Scorer.js index 17d5783b..7d54df79 100644 --- a/quickshell/Modals/DankLauncherV2/Scorer.js +++ b/quickshell/Modals/DankLauncherV2/Scorer.js @@ -152,7 +152,7 @@ function scoreItems(items, query, getFrecencyFn) { var item = items[i] var itemScore - if (query && item._preScored !== undefined) { + if (item._preScored !== undefined && (query || item._preScored > 900)) { itemScore = item._preScored } else { var frecencyData = getFrecencyFn ? getFrecencyFn(item) : null