mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-25 05:52:50 -05:00
feat: Implement DMS Core Persistent Apps
This commit is contained in:
@@ -114,9 +114,13 @@ Item {
|
||||
const items = AppSearchService.getPluginItems(pluginCategory, "");
|
||||
emptyTriggerItems = emptyTriggerItems.concat(items);
|
||||
});
|
||||
apps = AppSearchService.applications.concat(emptyTriggerItems);
|
||||
// Add Core Apps
|
||||
const coreItems = AppSearchService.getCoreApps("");
|
||||
apps = AppSearchService.applications.concat(emptyTriggerItems).concat(coreItems);
|
||||
} else {
|
||||
apps = AppSearchService.getAppsInCategory(selectedCategory).slice(0, maxResults);
|
||||
const coreItems = AppSearchService.getCoreApps("").filter(app => app.categories.includes(selectedCategory));
|
||||
apps = apps.concat(coreItems);
|
||||
}
|
||||
} else {
|
||||
if (selectedCategory === allCategory) {
|
||||
@@ -129,7 +133,9 @@ Item {
|
||||
const items = AppSearchService.getPluginItems(pluginCategory, searchQuery);
|
||||
emptyTriggerItems = emptyTriggerItems.concat(items);
|
||||
});
|
||||
apps = apps.concat(emptyTriggerItems);
|
||||
|
||||
const coreItems = AppSearchService.getCoreApps(searchQuery);
|
||||
apps = apps.concat(emptyTriggerItems).concat(coreItems);
|
||||
} else {
|
||||
const categoryApps = AppSearchService.getAppsInCategory(selectedCategory);
|
||||
if (categoryApps.length > 0) {
|
||||
@@ -139,6 +145,9 @@ Item {
|
||||
} else {
|
||||
apps = [];
|
||||
}
|
||||
|
||||
const coreItems = AppSearchService.getCoreApps(searchQuery).filter(app => app.categories.includes(selectedCategory));
|
||||
apps = apps.concat(coreItems);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -173,7 +182,7 @@ Item {
|
||||
seenNames.add(itemKey);
|
||||
uniqueApps.push(app);
|
||||
|
||||
const isPluginItem = app.action !== undefined;
|
||||
const isPluginItem = app.isCore ? false : (app.action !== undefined);
|
||||
filteredModel.append({
|
||||
"name": app.name || "",
|
||||
"exec": app.execString || app.exec || app.action || "",
|
||||
@@ -181,6 +190,7 @@ Item {
|
||||
"comment": app.comment || "",
|
||||
"categories": app.categories || [],
|
||||
"isPlugin": isPluginItem,
|
||||
"isCore": app.isCore === true,
|
||||
"appIndex": uniqueApps.length - 1
|
||||
});
|
||||
}
|
||||
@@ -237,6 +247,12 @@ Item {
|
||||
|
||||
const actualApp = _uniqueApps[appData.appIndex];
|
||||
|
||||
if (appData.isCore) {
|
||||
AppSearchService.executeCoreApp(actualApp);
|
||||
appLaunched(appData);
|
||||
return;
|
||||
}
|
||||
|
||||
if (appData.isPlugin) {
|
||||
const pluginId = getPluginIdForItem(actualApp);
|
||||
if (pluginId) {
|
||||
|
||||
Reference in New Issue
Block a user