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
+3 -1
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) {