Compare commits

...

5 Commits

Author SHA1 Message Date
soundofautmn
b9e056652f chore: 多余默认值优化 2026-02-16 23:42:49 +08:00
yali-hzy
1ea2a7ba80 fix: 移除定时器配置的空值检查,确保 TimerConfig 始终有效 2026-02-16 23:42:49 +08:00
soundofautmn
caf8de48c9 fix: 修复非空赋值报错 2026-02-16 23:42:49 +08:00
yali-hzy
f4b2490adc feat: Make CurrentConfiguration non-nullable
Changed CurrentConfiguration property to be non-nullable.
2026-02-16 23:42:49 +08:00
soundofautmn
cffa84fb80 chore: fix warning 2026-02-16 23:42:48 +08:00
4 changed files with 8 additions and 6 deletions

View File

@@ -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)
{
// 删除多余配置

View File

@@ -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: 模组Δ

View File

@@ -501,9 +501,9 @@ public class SettingsViewModel : Screen
public ObservableCollection<CombinedData> ConfigurationList { get; set; } = [];
private string? _currentConfiguration = ConfigurationHelper.GetCurrentConfiguration();
private string _currentConfiguration = ConfigurationHelper.GetCurrentConfiguration();
public string? CurrentConfiguration
public string CurrentConfiguration
{
get => _currentConfiguration;
set {

View File

@@ -143,16 +143,16 @@ public class TimerSettingsUserControlModel : PropertyChangedBase
}
}
private string? _timerConfig;
private string _timerConfig;
/// <summary>
/// Gets or sets the config of the timer.
/// </summary>
public string? TimerConfig
public string TimerConfig
{
get => _timerConfig;
set {
SetAndNotify(ref _timerConfig, value ?? ConfigurationHelper.GetCurrentConfiguration());
SetAndNotify(ref _timerConfig, value);
ConfigurationHelper.SetTimerConfig(TimerId, _timerConfig);
}
}