diff --git a/src/MaaWpfGui/Helper/ConfigConverter.cs b/src/MaaWpfGui/Helper/ConfigConverter.cs index 00d762d9e2..939fda8533 100644 --- a/src/MaaWpfGui/Helper/ConfigConverter.cs +++ b/src/MaaWpfGui/Helper/ConfigConverter.cs @@ -60,8 +60,9 @@ public class ConfigConverter { ret &= ConvertTaskQueue(); } - else if (configurations != null) // 保证 configurations 可用 + else if (configurations != null) { + // 保证 configurations 可用 if (parsedOld["Configurations"] is JObject oldConfigurations) { // 删除多余配置 diff --git a/src/MaaWpfGui/Models/Copilot/CopilotModel.cs b/src/MaaWpfGui/Models/Copilot/CopilotModel.cs index 643a350aa5..d28d09fe1e 100644 --- a/src/MaaWpfGui/Models/Copilot/CopilotModel.cs +++ b/src/MaaWpfGui/Models/Copilot/CopilotModel.cs @@ -117,6 +117,7 @@ public class CopilotModel : CopilotBase return string.Empty; } string[] moduleName = [string.Empty, "χ", "γ", "α", "Δ"]; + // var moduleLevel = req.ModuleLevel > 0 ? $" [Lv.{req.ModuleLevel}]" : string.Empty; // 模组编号 -1: 不切换模组 / 无要求, 0: 不使用模组, 1: 模组χ, 2: 模组γ, 3: 模组α, 4: 模组Δ diff --git a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs index 090d9e5ce1..72e7b48860 100644 --- a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs @@ -501,12 +501,16 @@ public class SettingsViewModel : Screen public ObservableCollection ConfigurationList { get; set; } = []; - private string? _currentConfiguration = ConfigurationHelper.GetCurrentConfiguration(); + private string _currentConfiguration = ConfigurationHelper.GetCurrentConfiguration(); public string? CurrentConfiguration { get => _currentConfiguration; set { + if (value == null) + { + return; + } bool ret = ConfigurationHelper.SwitchConfiguration(value); ret &= ConfigFactory.SwitchConfig(value);