Fix update background and system plugins

This commit is contained in:
Oleg Korshul
2024-12-15 21:39:23 +03:00
parent 325513086e
commit 9366554ae7
2 changed files with 23 additions and 4 deletions

View File

@ -3287,8 +3287,15 @@
{
if (null != this.pluginsManager)
{
this.pluginsManager.register(basePath, plugins);
let runnedArray = [];
this.pluginsManager.register(basePath, plugins, undefined, runnedArray);
this.checkInstalledPlugins();
for (let i = 0, len = runnedArray.length; i < len; i++)
{
if (!this.pluginsManager.isRunned(runnedArray[i]))
this.pluginsManager.run(runnedArray[i], 0, "");
}
}
else
{

View File

@ -206,7 +206,7 @@
return null;
},
register : function(basePath, plugins, isDelayRun)
register : function(basePath, plugins, isDelayRun, runDelayArray)
{
this.path = basePath;
@ -252,7 +252,12 @@
if (isSystem)
{
if (!isDelayRun)
this.run(guid, 0, "");
{
if (undefined === runDelayArray)
this.run(guid, 0, "");
else
runDelayArray.push(guid);
}
else
{
setTimeout(function(){
@ -271,7 +276,12 @@
if (!this.isRunned(guid))
{
if (!isDelayRun)
this.run(guid, 0, "");
{
if (undefined === runDelayArray)
this.run(guid, 0, "");
else
runDelayArray.push(guid);
}
else
{
setTimeout(function(){
@ -327,6 +337,8 @@
{
if (this.plugins[j].guid === newPlugin.guid)
{
if (this.runnedPluginsMap[newPlugin.guid])
this.close(newPlugin.guid);
this.plugins.splice(j, 1);
break;
}