Merge pull request #129 from ThatOneCalculator/fix/heuristic-lookup

fix: use heuristicLookup for desktop entries if available
This commit is contained in:
Lysec 2025-08-25 23:31:24 +02:00 committed by GitHub
commit d791705afa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,7 +33,9 @@ Singleton {
try {
if (typeof DesktopEntries === 'undefined' || !DesktopEntries.byId)
return iconFromName(fallback, fallback)
const entry = DesktopEntries.byId(appId)
const entry = (DesktopEntries.heuristicLookup) ?
DesktopEntries.heuristicLookup(appId) :
DesktopEntries.byId(appId)
const name = entry && entry.icon ? entry.icon : ""
return iconFromName(name || fallback, fallback)
} catch (e) {