MCPcopy Create free account
hub / github.com/material-shell/material-shell / getApps

Method getApps

src/manager/appsManager.ts:5–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4export class AppsManager {
5 static getApps() {
6 const usage = Shell.AppUsage.get_default();
7 const appSystem = Shell.AppSystem.get_default();
8 const appsInstalled = appSystem.get_installed().filter((appInfo) => {
9 try {
10 const _ = appInfo.get_id(); // catch invalid file encodings
11 } catch (e) {
12 return false;
13 }
14 return appInfo.should_show();
15 });
16
17 return appsInstalled
18 .sort((a, b) => {
19 return usage.compare(a.get_id(), b.get_id());
20 })
21 .map((appInfo) => {
22 return appSystem.lookup_app(appInfo.get_id());
23 });
24 }
25}

Callers 1

initAppListContainerMethod · 0.80

Calls 9

get_defaultMethod · 0.80
filterMethod · 0.80
get_installedMethod · 0.80
should_showMethod · 0.80
lookup_appMethod · 0.80
get_idMethod · 0.65
mapMethod · 0.65
sortMethod · 0.65
compareMethod · 0.65

Tested by

no test coverage detected