diff --git a/src/MaaWpfGui/Constants/ConfigurationKeys.cs b/src/MaaWpfGui/Constants/ConfigurationKeys.cs index 55fd062a8c..97d57368e3 100644 --- a/src/MaaWpfGui/Constants/ConfigurationKeys.cs +++ b/src/MaaWpfGui/Constants/ConfigurationKeys.cs @@ -118,6 +118,7 @@ namespace MaaWpfGui.Constants public const string RecruitMaxTimes = "AutoRecruit.MaxTimes"; public const string RefreshLevel3 = "AutoRecruit.RefreshLevel3"; public const string ForceRefresh = "AutoRecruit.ForceRefresh"; + public const string SelectExtraTags = "AutoRecruit.SelectExtraTags"; public const string IsLevel3UseShortTime = "AutoRecruit.IsLevel3UseShortTime"; public const string IsLevel3UseShortTime2 = "AutoRecruit.IsLevel3UseShortTime2"; public const string NotChooseLevel1 = "AutoRecruit.NotChooseLevel1"; diff --git a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs index 185bbb264f..109c508da1 100644 --- a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs @@ -2334,7 +2334,7 @@ namespace MaaWpfGui.ViewModels.UI set => SetAndNotify(ref _useExpedited, value); } - private bool _selectExtraTags; + private bool _selectExtraTags = Convert.ToBoolean(ConfigurationHelper.GetValue(ConfigurationKeys.SelectExtraTags, bool.FalseString)); /// /// Gets or sets a value indicating whether three tags are alway selected when selecting tags. @@ -2342,7 +2342,11 @@ namespace MaaWpfGui.ViewModels.UI public bool SelectExtraTags { get => _selectExtraTags; - set => SetAndNotify(ref _selectExtraTags, value); + set + { + SetAndNotify(ref _selectExtraTags, value); + ConfigurationHelper.SetValue(ConfigurationKeys.SelectExtraTags, value.ToString()); + } } private bool _isLevel3UseShortTime = Convert.ToBoolean(ConfigurationHelper.GetValue(ConfigurationKeys.IsLevel3UseShortTime, bool.FalseString));