mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
Divide load and initialize of plugins into two stages (#10650)
This commit is contained in:
@@ -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>();
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user