From deed7f4edb24e1f8569c1106c0809945c06cd58c Mon Sep 17 00:00:00 2001 From: uye <99072975+ABA2396@users.noreply.github.com> Date: Sun, 6 Jul 2025 12:46:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=AB=98=E7=89=88=E6=9C=AC=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E5=88=B0=E4=BD=8E=E7=89=88=E6=9C=AC=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=97=B6=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA=E6=97=A0=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewModels/UI/VersionUpdateViewModel.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/MaaWpfGui/ViewModels/UI/VersionUpdateViewModel.cs b/src/MaaWpfGui/ViewModels/UI/VersionUpdateViewModel.cs index 48cdebbad4..96a42e5483 100644 --- a/src/MaaWpfGui/ViewModels/UI/VersionUpdateViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/VersionUpdateViewModel.cs @@ -1073,14 +1073,6 @@ public class VersionUpdateViewModel : Screen return CheckUpdateRetT.UnknownError; } - if (data["data"]?["update_type"]?.ToObject() == "full") - { - using var toast = new ToastNotification(LocalizationHelper.GetString("NewVersionNoOtaPackage")); - toast.Show(30); - _logger.Warning("No OTA package found, but full package found."); - Instances.TaskQueueViewModel.AddLog(LocalizationHelper.GetString("NewVersionNoOtaPackage"), UiLogColor.Warning); - } - var version = data["data"]?["version_name"]?.ToString(); if (string.IsNullOrEmpty(version)) { @@ -1092,6 +1084,14 @@ public class VersionUpdateViewModel : Screen return CheckUpdateRetT.AlreadyLatest; } + if (data["data"]?["update_type"]?.ToObject() == "full") + { + using var toast = new ToastNotification(LocalizationHelper.GetString("NewVersionNoOtaPackage")); + toast.Show(30); + _logger.Warning("No OTA package found, but full package found."); + Instances.TaskQueueViewModel.AddLog(LocalizationHelper.GetString("NewVersionNoOtaPackage"), UiLogColor.Warning); + } + // 到这里已经确定有新版本了 _logger.Information($"New version found: {version}");