Browse Source

Renamed state change event to better represent its actual meaning

pull/46/head
Anairkoen Schno 4 years ago
parent
commit
8af980c1a4
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      IPA.Loader/Loader/PluginManager.cs

+ 3
- 4
IPA.Loader/Loader/PluginManager.cs View File

@ -159,7 +159,6 @@ namespace IPA.Loader
} }
var result = TaskEx.WhenAll(); var result = TaskEx.WhenAll();
if (toDisable.Any())
{ {
// then disable the mods that need to be // then disable the mods that need to be
static DisableExecutor MakeDisableExec(PluginExecutor e) static DisableExecutor MakeDisableExec(PluginExecutor e)
@ -209,7 +208,7 @@ namespace IPA.Loader
var disabled = new Dictionary<PluginExecutor, Task>(); var disabled = new Dictionary<PluginExecutor, Task>();
result = TaskEx.WhenAll(disableStructure.Select(d => Disable(d, disabled))); result = TaskEx.WhenAll(disableStructure.Select(d => Disable(d, disabled)));
OnPluginsDisabled?.Invoke(result);
OnPluginsStateChanged?.Invoke(result);
} }
//DisabledConfig.Instance.Changed(); //DisabledConfig.Instance.Changed();
@ -261,13 +260,13 @@ namespace IPA.Loader
/// </summary> /// </summary>
public static event PluginDisableDelegate PluginDisabled; public static event PluginDisableDelegate PluginDisabled;
/// <summary> /// <summary>
/// Called whenever any plugins are disabled with the <see cref="Task"/> representing them being disabled.
/// Called whenever any plugins have their state changed with the <see cref="Task"/> representing that state change.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Note that this is called on the Unity main thread, and cannot therefore block, as the <see cref="Task"/> /// Note that this is called on the Unity main thread, and cannot therefore block, as the <see cref="Task"/>
/// provided represents operations that also run on the Unity main thread. /// provided represents operations that also run on the Unity main thread.
/// </remarks> /// </remarks>
public static event Action<Task> OnPluginsDisabled;
public static event Action<Task> OnPluginsStateChanged;
/// <summary> /// <summary>
/// Gets a list of all enabled BSIPA plugins. Use <see cref="EnabledPlugins"/> instead of this. /// Gets a list of all enabled BSIPA plugins. Use <see cref="EnabledPlugins"/> instead of this.


Loading…
Cancel
Save