Divide load and initialize of plugins into two stages (#10650)

This commit is contained in:
Mykhailo Pylyp
2021-04-08 16:07:26 +03:00
committed by GitHub
parent 55a851e5f2
commit 97fdf10cea
4 changed files with 37 additions and 20 deletions

View File

@@ -128,9 +128,9 @@ namespace PowerLauncher.Plugin
return;
}
pair.LoadPlugin(API);
pair.InitializePlugin(API);
if (!pair.IsPluginLoaded)
if (!pair.IsPluginInitialized)
{
failedPlugins.Enqueue(pair);
}
@@ -159,7 +159,7 @@ namespace PowerLauncher.Plugin
throw new ArgumentNullException(nameof(pair));
}
if (!pair.IsPluginLoaded)
if (!pair.IsPluginInitialized)
{
return new List<Result>();
}

View File

@@ -187,8 +187,8 @@ namespace PowerLauncher
return PluginManager.AllPlugins.Select(x => new PowerLauncherPluginSettings()
{
Id = x.Metadata.ID,
Name = x.Plugin.Name,
Description = x.Plugin.Description,
Name = x.Plugin == null ? x.Metadata.Name : x.Plugin.Name,
Description = x.Plugin?.Description,
Author = x.Metadata.Author,
Disabled = x.Metadata.Disabled,
IsGlobal = x.Metadata.IsGlobal,