1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

AppSearch: Add ID search fallback for non-English / non-standard apps (#1173)

This commit is contained in:
xxyangyoulin
2025-12-28 01:26:43 +08:00
committed by GitHub
parent 4493b7c231
commit 5c420ab50b

View File

@@ -162,6 +162,7 @@ Singleton {
const name = (app.name || "").toLowerCase()
const genericName = (app.genericName || "").toLowerCase()
const comment = (app.comment || "").toLowerCase()
const id = (app.id || "").toLowerCase()
const keywords = app.keywords ? app.keywords.map(k => k.toLowerCase()) : []
let textScore = 0
@@ -185,6 +186,9 @@ Singleton {
} else if (genericName && genericName.includes(queryLower)) {
textScore = 400
matchType = "generic"
} else if (id && id.includes(queryLower)) {
textScore = 350
matchType = "id"
}
if (matchType === "none" && keywords.length > 0) {