mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-10 07:42:09 -04:00
launcher v2: de-dupe cached entries by ID
This commit is contained in:
@@ -111,7 +111,17 @@ Singleton {
|
||||
|
||||
function getVisibleApplications() {
|
||||
if (_cachedVisibleApps === null) {
|
||||
_cachedVisibleApps = applications.filter(app => !isAppHidden(app));
|
||||
const seen = new Set();
|
||||
_cachedVisibleApps = applications.filter(app => {
|
||||
if (isAppHidden(app))
|
||||
return false;
|
||||
const id = app.id;
|
||||
if (id && seen.has(id))
|
||||
return false;
|
||||
if (id)
|
||||
seen.add(id);
|
||||
return true;
|
||||
});
|
||||
}
|
||||
return _cachedVisibleApps.map(app => applyAppOverride(app));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user