improve:自动更新
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user