forked from sim0n00ps/OF-DL
Remove unused EnforceGuiOnlyConfigValues function
This commit is contained in:
parent
4ea2a6107f
commit
d0de99a00c
@ -606,7 +606,6 @@ public partial class MainWindowViewModel(
|
||||
}
|
||||
|
||||
_configReturnScreen = CurrentScreen;
|
||||
EnforceGuiOnlyConfigValues(configService.CurrentConfig);
|
||||
BuildConfigFields(configService.CurrentConfig);
|
||||
ConfigScreenMessage = "Edit configuration values and save to apply changes.";
|
||||
CurrentScreen = AppScreen.Config;
|
||||
@ -616,7 +615,6 @@ public partial class MainWindowViewModel(
|
||||
private async Task CancelConfigAsync()
|
||||
{
|
||||
bool loaded = await configService.LoadConfigurationAsync([]);
|
||||
EnforceGuiOnlyConfigValues(configService.CurrentConfig);
|
||||
BuildConfigFields(configService.CurrentConfig);
|
||||
|
||||
if (!loaded)
|
||||
@ -676,12 +674,10 @@ public partial class MainWindowViewModel(
|
||||
return;
|
||||
}
|
||||
|
||||
EnforceGuiOnlyConfigValues(newConfig);
|
||||
configService.UpdateConfig(newConfig);
|
||||
await configService.SaveConfigurationAsync();
|
||||
|
||||
bool reloaded = await configService.LoadConfigurationAsync([]);
|
||||
EnforceGuiOnlyConfigValues(configService.CurrentConfig);
|
||||
if (!reloaded)
|
||||
{
|
||||
ConfigScreenMessage = "config.conf could not be loaded after saving. Please review your values.";
|
||||
@ -1245,13 +1241,11 @@ public partial class MainWindowViewModel(
|
||||
ApplyThemeFromConfigFileIfAvailable();
|
||||
_configReturnScreen = CurrentScreen;
|
||||
SetLoading("Loading configuration...");
|
||||
EnforceGuiOnlyConfigValues(configService.CurrentConfig);
|
||||
BuildConfigFields(configService.CurrentConfig);
|
||||
UserLists.Clear();
|
||||
AvailableUsers.Clear();
|
||||
|
||||
bool configLoaded = await configService.LoadConfigurationAsync([]);
|
||||
EnforceGuiOnlyConfigValues(configService.CurrentConfig);
|
||||
BuildConfigFields(configService.CurrentConfig);
|
||||
if (!configLoaded)
|
||||
{
|
||||
@ -1799,7 +1793,6 @@ public partial class MainWindowViewModel(
|
||||
private bool TryBuildConfig(out Config config)
|
||||
{
|
||||
config = CloneConfig(configService.CurrentConfig);
|
||||
EnforceGuiOnlyConfigValues(config);
|
||||
ClearSpecialConfigErrors();
|
||||
Dictionary<string, object?> parsedValues = new(StringComparer.Ordinal);
|
||||
Dictionary<string, ConfigFieldViewModel> fieldMap = ConfigFields
|
||||
@ -1834,7 +1827,6 @@ public partial class MainWindowViewModel(
|
||||
}
|
||||
|
||||
ApplySpecialConfigValues(config);
|
||||
EnforceGuiOnlyConfigValues(config);
|
||||
config.CreatorConfigs = CreatorConfigEditor.ToDictionary();
|
||||
ValidateSpecialConfigValues();
|
||||
if (HasSpecialConfigErrors())
|
||||
@ -2360,8 +2352,6 @@ public partial class MainWindowViewModel(
|
||||
return JsonConvert.DeserializeObject<Config>(json) ?? new Config();
|
||||
}
|
||||
|
||||
private static void EnforceGuiOnlyConfigValues(Config config) => _ = config;
|
||||
|
||||
private static bool IsHiddenConfigField(string propertyName) =>
|
||||
propertyName is nameof(Config.NonInteractiveMode)
|
||||
or nameof(Config.NonInteractiveModeListName)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user