mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-04 23:09:40 +00:00
Refactored plugin settings handling for maintainability (#515)
This commit is contained in:
1 parent
1b8ed286e7
commit
7df0b3e6e0
3 files changed
+20
-1
No files matched your search
@@ -48,7 +48,7 @@ public sealed class PluginConfiguration(bool isInternal, LuaState state, PluginT
|
||||
return false;
|
||||
}
|
||||
|
||||
if (settingsTable.TryGetValue("DataApp.UpdateBehavior", out var updateBehaviorValue) && updateBehaviorValue.TryRead<string>(out var updateBehaviorText) && Enum.TryParse<UpdateBehavior>(updateBehaviorText, true, out var updateBehavior))
|
||||
if (settingsTable.TryGetValue(SettingsManager.ToSettingName<DataApp>(x => x.UpdateBehavior), out var updateBehaviorValue) && updateBehaviorValue.TryRead<string>(out var updateBehaviorText) && Enum.TryParse<UpdateBehavior>(updateBehaviorText, true, out var updateBehavior))
|
||||
{
|
||||
SETTINGS_LOCKER.Register<DataApp>(x => x.UpdateBehavior, this.Id);
|
||||
SETTINGS_MANAGER.ConfigurationData.App.UpdateBehavior = updateBehavior;
|
||||
|
||||
Reference in new issue
Block a user