From d5637550da55e7ecb735652c64e4bbab5b235bcd Mon Sep 17 00:00:00 2001 From: youqii Date: Tue, 24 Oct 2023 19:07:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=AC=E6=8B=9B=E5=A4=9A=E9=80=89=20T?= =?UTF-8?q?ags=20=E4=BF=9D=E5=AD=98=E8=87=B3=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaWpfGui/Constants/ConfigurationKeys.cs | 1 + src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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));