mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-04 04:42:05 -04:00
cc: fix plugin reloading in bar position changes
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user