fix(settings): 读取版本设置时错误地使用了缓存

This commit is contained in:
wyc-26
2026-04-13 19:52:40 +08:00
parent f578dbd784
commit 3862d77e50
2 changed files with 5 additions and 0 deletions
@@ -823,6 +823,8 @@ ExitDataLoad:
If State = McInstanceState.Fool Then If State = McInstanceState.Fool Then
Info = GetMcFoolName(Version.VanillaName) Info = GetMcFoolName(Version.VanillaName)
ElseIf State <> McInstanceState.Error Then ElseIf State <> McInstanceState.Error Then
'这里不应使用缓存,因为不同实例有不同值 (#8508)
Settings.MakeInstanceDirty()
If Settings.Get("VersionServerLogin", Instance:=Me) = 3 Then Info += ", 统一通行证验证" If Settings.Get("VersionServerLogin", Instance:=Me) = 3 Then Info += ", 统一通行证验证"
If Settings.Get("VersionServerLogin", Instance:=Me) = 4 Then Info += ", Authlib 验证" If Settings.Get("VersionServerLogin", Instance:=Me) = 4 Then Info += ", Authlib 验证"
End If End If
@@ -26,6 +26,9 @@
Public Sub Reload() Public Sub Reload()
Try Try
'清除缓存
Settings.MakeInstanceDirty()
'启动参数 '启动参数
TextArgumentTitle.Text = Settings.Get("VersionArgumentTitle", Instance:=PageInstanceLeft.Instance) TextArgumentTitle.Text = Settings.Get("VersionArgumentTitle", Instance:=PageInstanceLeft.Instance)
TextArgumentInfo.Text = Settings.Get("VersionArgumentInfo", Instance:=PageInstanceLeft.Instance) TextArgumentInfo.Text = Settings.Get("VersionArgumentInfo", Instance:=PageInstanceLeft.Instance)