mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-11 20:34:07 +02:00
Remove plugin.CanRun call from PluginConfig.IsEnabled
This commit is contained in:
parent
c11f36dfef
commit
4990afcdbb
Plugins
@ -61,7 +61,7 @@ private void btnToggleState_Click(object sender, EventArgs e){
|
||||
}
|
||||
|
||||
private void UpdatePluginState(){
|
||||
bool isEnabled = plugin.CanRun && pluginManager.Config.IsEnabled(plugin);
|
||||
bool isEnabled = pluginManager.Config.IsEnabled(plugin) && plugin.CanRun;
|
||||
Color textColor = isEnabled ? Color.Black : Color.FromArgb(90, 90, 90);
|
||||
|
||||
labelVersion.ForeColor = textColor;
|
||||
|
@ -20,7 +20,7 @@ public void SetEnabled(Plugin plugin, bool enabled){
|
||||
}
|
||||
|
||||
public bool IsEnabled(Plugin plugin){
|
||||
return !Disabled.Contains(plugin.Identifier) && plugin.CanRun;
|
||||
return !Disabled.Contains(plugin.Identifier);
|
||||
}
|
||||
|
||||
public void DisableOfficialFromConfig(string pluginName){
|
||||
|
@ -115,7 +115,7 @@ public void ExecutePlugins(IFrame frame, PluginEnvironment environment, bool inc
|
||||
|
||||
foreach(Plugin plugin in Plugins){
|
||||
string path = plugin.GetScriptPath(environment);
|
||||
if (string.IsNullOrEmpty(path) || !plugin.CanRun || (!includeDisabled && !Config.IsEnabled(plugin)))continue;
|
||||
if (string.IsNullOrEmpty(path) || (!includeDisabled && !Config.IsEnabled(plugin)) || !plugin.CanRun)continue;
|
||||
|
||||
string script;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user