From 7b8598bf9ff72f50ff17836f69f0bf0708ce459d Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Mon, 6 Oct 2025 22:41:53 +0800 Subject: [PATCH] Revert "Update MainWindow.xaml.cs" This reverts commit 298164d6ed924d981160ecedb02bf85e679a60ba. --- Ink Canvas/MainWindow.xaml.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Ink Canvas/MainWindow.xaml.cs b/Ink Canvas/MainWindow.xaml.cs index cf265542..c135d225 100644 --- a/Ink Canvas/MainWindow.xaml.cs +++ b/Ink Canvas/MainWindow.xaml.cs @@ -832,6 +832,8 @@ namespace Ink_Canvas // 声明下载状态变量,用于整个方法 bool isDownloadSuccessful = false; + bool hasValidLineGroup = lineGroup != null; + if (AvailableLatestVersion != null) { // 检测到新版本,停止重试定时器 @@ -1001,6 +1003,14 @@ namespace Ink_Canvas break; } } + else if (hasValidLineGroup) + { + LogHelper.WriteLogToFile("AutoUpdate | Current version is already the latest, no retry needed"); + + // 停止重试定时器 + timerCheckAutoUpdateRetry.Stop(); + updateCheckRetryCount = 0; + } else { // 检查更新失败,启动重试定时器 @@ -1017,7 +1027,7 @@ namespace Ink_Canvas } } - // 崩溃后操作设置按钮事件 + // 新增:崩溃后操作设置按钮事件 private void RadioCrashAction_Checked(object sender, RoutedEventArgs e) { if (RadioCrashSilentRestart != null && RadioCrashSilentRestart.IsChecked == true)