From 03d19d458ab7a1398f11f7b9ad6aa499ddae6943 Mon Sep 17 00:00:00 2001 From: ywmoyue Date: Sat, 6 May 2023 12:02:24 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=BF=BD=E7=95=A5?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BiliLite.UWP/Helpers/SettingHelper.cs | 2 ++ src/BiliLite.UWP/Helpers/Utils.cs | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/BiliLite.UWP/Helpers/SettingHelper.cs b/src/BiliLite.UWP/Helpers/SettingHelper.cs index 64c1548a..914eceb5 100644 --- a/src/BiliLite.UWP/Helpers/SettingHelper.cs +++ b/src/BiliLite.UWP/Helpers/SettingHelper.cs @@ -552,6 +552,8 @@ public class Other /// 保护日志敏感信息 /// public const string PROTECT_LOG_INFO = "protectLogInfo"; + + public const string IGNORE_VERSION = "ignoreVersion"; } } } diff --git a/src/BiliLite.UWP/Helpers/Utils.cs b/src/BiliLite.UWP/Helpers/Utils.cs index b5baeba7..a23dffb5 100644 --- a/src/BiliLite.UWP/Helpers/Utils.cs +++ b/src/BiliLite.UWP/Helpers/Utils.cs @@ -298,6 +298,8 @@ public static async Task CheckVersion() { var result = await new GitApi().CheckUpdate().Request(); var ver = JsonConvert.DeserializeObject(result.results); + var ignoreVersion = SettingHelper.GetValue(SettingHelper.Other.IGNORE_VERSION, ""); + if (ignoreVersion.Equals(ver.version)) return; var num = $"{SystemInformation.ApplicationVersion.Major}{SystemInformation.ApplicationVersion.Minor.ToString("00")}{SystemInformation.ApplicationVersion.Build.ToString("00")}"; var v = int.Parse(num); if (ver.version_num > v) @@ -318,12 +320,17 @@ public static async Task CheckVersion() }); dialog.Content = markdownText; dialog.PrimaryButtonText = "查看详情"; - dialog.SecondaryButtonText = "忽略"; + dialog.CloseButtonText = "取消"; + dialog.SecondaryButtonText = "忽略该版本"; dialog.PrimaryButtonClick += new Windows.Foundation.TypedEventHandler(async (sender, e) => { await Windows.System.Launcher.LaunchUriAsync(new Uri(ver.url)); }); + dialog.SecondaryButtonClick += (sender, e) => + { + SettingHelper.SetValue(SettingHelper.Other.IGNORE_VERSION, ver.version); + }; await dialog.ShowAsync(); } } From 542ba8bbb5356d5cb0da203acdf5b7e71479c073 Mon Sep 17 00:00:00 2001 From: ywmoyue Date: Sat, 6 May 2023 19:22:34 +0800 Subject: [PATCH 2/2] 4.5.6 --- document/new_version.json | 6 +++--- src/BiliLite.Packages/Package.appxmanifest | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/document/new_version.json b/document/new_version.json index 0a2863a3..49786e7f 100644 --- a/document/new_version.json +++ b/document/new_version.json @@ -1,7 +1,7 @@ { - "version": "4.5.5", - "version_num": 40505, - "version_desc": "更新内容:\r\n\r\n* 修复收藏夹无法打开\r\n\r\n* 修复无法获取直播间大航海列表\r\n\r\n* 日志输出添加类型名\r\n\r\n\r\n 如果无法打开下载地址,请访问:https://github.com/ywmoyue/biliuwp-lite/releases", + "version": "4.5.6", + "version_num": 40506, + "version_desc": "更新内容:\r\n\r\n* 支持忽略更新版本\r\n\r\n\r\n 如果无法打开下载地址,请访问:https://github.com/ywmoyue/biliuwp-lite/releases", "url": "https://github.com/ywmoyue/biliuwp-lite/releases", "download_url": "https://github.com/ywmoyue/biliuwp-lite/releases" } \ No newline at end of file diff --git a/src/BiliLite.Packages/Package.appxmanifest b/src/BiliLite.Packages/Package.appxmanifest index 5e356675..ee8eca16 100644 --- a/src/BiliLite.Packages/Package.appxmanifest +++ b/src/BiliLite.Packages/Package.appxmanifest @@ -14,7 +14,7 @@ + Version="4.5.6.0" />