mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-08-17 00:31:42 +02:00
Seal PluginConfig and add a method to disable official plugins from config
This commit is contained in:
@@ -4,7 +4,7 @@ using TweetDck.Plugins.Events;
|
|||||||
|
|
||||||
namespace TweetDck.Plugins{
|
namespace TweetDck.Plugins{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
class PluginConfig{
|
sealed class PluginConfig{
|
||||||
[field:NonSerialized]
|
[field:NonSerialized]
|
||||||
public event EventHandler<PluginChangedStateEventArgs> PluginChangedState;
|
public event EventHandler<PluginChangedStateEventArgs> PluginChangedState;
|
||||||
|
|
||||||
@@ -33,5 +33,9 @@ namespace TweetDck.Plugins{
|
|||||||
public bool IsEnabled(Plugin plugin){
|
public bool IsEnabled(Plugin plugin){
|
||||||
return !Disabled.Contains(plugin.Identifier) && plugin.CanRun;
|
return !Disabled.Contains(plugin.Identifier) && plugin.CanRun;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void DisableOfficialFromConfig(string pluginName){
|
||||||
|
Disabled.Add("official/"+pluginName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user