1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-04 12:52:06 -04:00

cc: fix plugin reloading in bar position changes

This commit is contained in:
bbedward
2026-02-17 17:24:22 -05:00
parent fed3c36f84
commit 3d35af2a87
3 changed files with 41 additions and 23 deletions

View File

@@ -216,14 +216,18 @@ QtObject {
}
const pluginComponent = PluginService.pluginWidgetComponents[plugin.id];
if (!pluginComponent || typeof pluginComponent.createObject !== 'function') {
if (!pluginComponent)
continue;
}
const tempInstance = pluginComponent.createObject(null);
if (!tempInstance) {
let tempInstance;
try {
tempInstance = pluginComponent.createObject(null);
} catch (e) {
PluginService.reloadPlugin(plugin.id);
continue;
}
if (!tempInstance)
continue;
const hasCCWidget = tempInstance.ccWidgetIcon && tempInstance.ccWidgetIcon.length > 0;
tempInstance.destroy();