mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-11 16:22:09 -04:00
Merge branch 'master' into auto-theme
This commit is contained in:
@@ -884,4 +884,52 @@ Singleton {
|
||||
|
||||
return allItems;
|
||||
}
|
||||
|
||||
function getPluginLauncherCategories(pluginId) {
|
||||
if (typeof PluginService === "undefined")
|
||||
return [];
|
||||
|
||||
const instance = PluginService.pluginInstances[pluginId];
|
||||
if (!instance)
|
||||
return [];
|
||||
|
||||
if (typeof instance.getCategories !== "function")
|
||||
return [];
|
||||
|
||||
try {
|
||||
return instance.getCategories() || [];
|
||||
} catch (e) {
|
||||
console.warn("AppSearchService: Error getting categories from plugin", pluginId, ":", e);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
function setPluginLauncherCategory(pluginId, categoryId) {
|
||||
if (typeof PluginService === "undefined")
|
||||
return;
|
||||
|
||||
const instance = PluginService.pluginInstances[pluginId];
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (typeof instance.setCategory !== "function")
|
||||
return;
|
||||
|
||||
try {
|
||||
instance.setCategory(categoryId);
|
||||
} catch (e) {
|
||||
console.warn("AppSearchService: Error setting category on plugin", pluginId, ":", e);
|
||||
}
|
||||
}
|
||||
|
||||
function pluginHasCategories(pluginId) {
|
||||
if (typeof PluginService === "undefined")
|
||||
return false;
|
||||
|
||||
const instance = PluginService.pluginInstances[pluginId];
|
||||
if (!instance)
|
||||
return false;
|
||||
|
||||
return typeof instance.getCategories === "function";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ Singleton {
|
||||
|
||||
Component.onCompleted: {
|
||||
root.userPreference = SettingsData.networkPreference;
|
||||
lastConnectedVpnUuid = SettingsData.vpnLastConnected || "";
|
||||
lastConnectedVpnUuid = SessionData.vpnLastConnected || "";
|
||||
if (socketPath && socketPath.length > 0) {
|
||||
checkDMSCapabilities();
|
||||
}
|
||||
@@ -293,7 +293,7 @@ Singleton {
|
||||
|
||||
if (vpnConnected && activeUuid) {
|
||||
lastConnectedVpnUuid = activeUuid;
|
||||
SettingsData.set("vpnLastConnected", activeUuid);
|
||||
SessionData.setVpnLastConnected(activeUuid);
|
||||
}
|
||||
|
||||
if (vpnIsBusy) {
|
||||
|
||||
Reference in New Issue
Block a user