Skip to content

Commit

Permalink
Merge pull request #78 from ywmoyue/76-ignore-version
Browse files Browse the repository at this point in the history
4.5.6
  • Loading branch information
ywmoyue authored May 6, 2023
2 parents de0aff9 + 542ba8b commit 26abc69
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
6 changes: 3 additions & 3 deletions document/new_version.json
Original file line number Diff line number Diff line change
@@ -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"
}
2 changes: 1 addition & 1 deletion src/BiliLite.Packages/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<Identity
Name="5422.502643927C6AD"
Publisher="CN=muyan"
Version="4.5.5.0" />
Version="4.5.6.0" />
<mp:PhoneIdentity PhoneProductId="8bceed6a-7e89-4141-a693-923401d5b2ac" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

<Properties>
Expand Down
2 changes: 2 additions & 0 deletions src/BiliLite.UWP/Helpers/SettingHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,8 @@ public class Other
/// 保护日志敏感信息
/// </summary>
public const string PROTECT_LOG_INFO = "protectLogInfo";

public const string IGNORE_VERSION = "ignoreVersion";
}
}
}
9 changes: 8 additions & 1 deletion src/BiliLite.UWP/Helpers/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ public static async Task CheckVersion()
{
var result = await new GitApi().CheckUpdate().Request();
var ver = JsonConvert.DeserializeObject<NewVersion>(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)
Expand All @@ -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<ContentDialog, ContentDialogButtonClickEventArgs>(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();
}
}
Expand Down

0 comments on commit 26abc69

Please sign in to comment.