mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-15 10:12:07 -04:00
AppSearch: Add ID search fallback for non-English / non-standard apps (#1173)
This commit is contained in:
@@ -162,6 +162,7 @@ Singleton {
|
|||||||
const name = (app.name || "").toLowerCase()
|
const name = (app.name || "").toLowerCase()
|
||||||
const genericName = (app.genericName || "").toLowerCase()
|
const genericName = (app.genericName || "").toLowerCase()
|
||||||
const comment = (app.comment || "").toLowerCase()
|
const comment = (app.comment || "").toLowerCase()
|
||||||
|
const id = (app.id || "").toLowerCase()
|
||||||
const keywords = app.keywords ? app.keywords.map(k => k.toLowerCase()) : []
|
const keywords = app.keywords ? app.keywords.map(k => k.toLowerCase()) : []
|
||||||
|
|
||||||
let textScore = 0
|
let textScore = 0
|
||||||
@@ -185,6 +186,9 @@ Singleton {
|
|||||||
} else if (genericName && genericName.includes(queryLower)) {
|
} else if (genericName && genericName.includes(queryLower)) {
|
||||||
textScore = 400
|
textScore = 400
|
||||||
matchType = "generic"
|
matchType = "generic"
|
||||||
|
} else if (id && id.includes(queryLower)) {
|
||||||
|
textScore = 350
|
||||||
|
matchType = "id"
|
||||||
}
|
}
|
||||||
|
|
||||||
if (matchType === "none" && keywords.length > 0) {
|
if (matchType === "none" && keywords.length > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user