mirror of
https://github.com/ONLYOFFICE/sdkjs.git
synced 2026-02-10 18:15:19 +08:00
Fix update background and system plugins
This commit is contained in:
@ -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
|
||||
{
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user