improve:自动更新

This commit is contained in:
2025-10-04 14:47:53 +08:00
parent 903fa699ca
commit 3f28bc5c6c
5 changed files with 107 additions and 1 deletions
+14
View File
@@ -834,6 +834,10 @@ namespace Ink_Canvas
if (AvailableLatestVersion != null)
{
// 检测到新版本,停止重试定时器
timerCheckAutoUpdateRetry.Stop();
updateCheckRetryCount = 0;
// 检测到新版本
LogHelper.WriteLogToFile($"AutoUpdate | New version available: {AvailableLatestVersion}");
@@ -999,6 +1003,16 @@ namespace Ink_Canvas
}
else
{
// 检查更新失败,启动重试定时器
LogHelper.WriteLogToFile("AutoUpdate | Update check failed, starting retry timer");
// 重置重试计数
updateCheckRetryCount = 0;
// 启动重试定时器,10分钟后重新检查
timerCheckAutoUpdateRetry.Start();
// 清理更新文件夹
AutoUpdateHelper.DeleteUpdatesFolder();
}
}