Improve CheckUpdateModel

This commit is contained in:
2dust
2026-05-18 17:32:07 +08:00
parent 460a674ebc
commit f7206f3405
14 changed files with 113 additions and 38 deletions
+8 -2
View File
@@ -104,7 +104,7 @@ public class UpdateService(Config config, Func<bool, string, Task> updateFunc)
{
if (!CoreInfoManager.Instance.IsCheckUpdateSupported(type))
{
return new UpdateResult(false, "Not Support");
return new UpdateResult(false, ResUI.MsgNotSupport);
}
var downloadHandle = new DownloadService();
@@ -120,7 +120,13 @@ public class UpdateService(Config config, Func<bool, string, Task> updateFunc)
var result = await CheckHasUpdateOnly(type, preRelease);
if (result.Success && result.Version != null)
{
msgs.Add(string.Format(ResUI.MsgCheckUpdateHasNewVersion, type, result.Version));
var msg = string.Format(ResUI.MsgCheckUpdateHasNewVersion, type, result.Version);
msgs.Add(msg);
AppManager.Instance.SetLastCheckUpdateResult(type, msg);
}
else
{
AppManager.Instance.SetLastCheckUpdateResult(type, result.Msg);
}
}
return msgs;