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" />
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();
}
}