Skip to content

Commit

Permalink
Update VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
qe201020335 committed Apr 8, 2023
1 parent f56f183 commit aa97616
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions QuestPatcher/UIPrompter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using System.Net.Http;
using System.Threading.Tasks;
using QuestPatcher.Utils;
using Version = SemanticVersioning.Version;

namespace QuestPatcher
{
Expand Down Expand Up @@ -51,16 +52,18 @@ public async Task<bool> CheckUpdate()

var newest = res["tag_name"]?.ToString();
if (newest == null) throw new Exception("Failed to check update.");

var isLatest = Version.TryParse(newest, out var latest) && latest == VersionUtil.QuestPatcherVersion;

if (newest != VersionUtil.QuestPatcherVersion.ToString())
if (!isLatest)
{
DialogBuilder builder = new()
{
Title = "有更新!",
Text = $"**不更新软件,可能会遇到未知问题,强烈建议更新至最新版**\n" +
$"同时,非最新版本将不受支持且不保证没有安全问题\n\n" +
$"您的版本 - v{VersionUtil.QuestPatcherVersion}\n" +
$"最新版本 - v{newest}",
$"最新版本 - v{latest?.ToString() ?? newest}",
HideOkButton = true,
HideCancelButton = true
};
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.0-1
2.5.1+cn

0 comments on commit aa97616

Please sign in to comment.