Skip to content

Commit

Permalink
Cleanup actions from disabled addons.
Browse files Browse the repository at this point in the history
  • Loading branch information
RedHatter authored and azeier committed Nov 30, 2016
1 parent 1c2bec1 commit 38be9ed
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Hearthstone Deck Tracker/API/ActionList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ internal void Execute(T arg)
var sw = Stopwatch.StartNew();
var plugin = action.Item1 as PluginWrapper;
if(plugin != null && !plugin.IsEnabled)
{
remove.Add(action);
continue;
}
try
{
action.Item2.Invoke(arg);
Expand Down Expand Up @@ -83,7 +86,10 @@ internal void Execute()
var sw = Stopwatch.StartNew();
var plugin = action.Item1 as PluginWrapper;
if(plugin != null && !plugin.IsEnabled)
{
remove.Add(action);
continue;
}
try
{
action.Item2.Invoke();
Expand All @@ -106,4 +112,4 @@ internal void Execute()

private string GetInfo(PluginWrapper p) => p != null ? $" (Plugin: {p.Name})" : "";
}
}
}

0 comments on commit 38be9ed

Please sign in to comment.