Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sn4k3/UVtools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'UVtools.WPF/Structures/AppVersionChecker.cs')
-rw-r--r--UVtools.WPF/Structures/AppVersionChecker.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/UVtools.WPF/Structures/AppVersionChecker.cs b/UVtools.WPF/Structures/AppVersionChecker.cs
index ccbe2b7..c043435 100644
--- a/UVtools.WPF/Structures/AppVersionChecker.cs
+++ b/UVtools.WPF/Structures/AppVersionChecker.cs
@@ -100,7 +100,7 @@ namespace UVtools.WPF.Structures
{
try
{
- using WebClient client = new WebClient
+ using WebClient client = new()
{
Headers = new WebHeaderCollection
{
@@ -114,16 +114,17 @@ namespace UVtools.WPF.Structures
if (string.IsNullOrEmpty(tag_name)) return false;
tag_name = tag_name.Trim(' ', 'v', 'V');
Debug.WriteLine($"Version checker: v{App.VersionStr} <=> v{tag_name}");
-
+ Version checkVersion = new(tag_name);
Changelog = json.body;
- if (string.Compare(tag_name, App.VersionStr, StringComparison.OrdinalIgnoreCase) > 0)
+ //if (string.Compare(tag_name, App.VersionStr, StringComparison.OrdinalIgnoreCase) > 0)
+ if (App.Version.CompareTo(checkVersion) < 0)
{
+ Debug.WriteLine($"New version detected: {DownloadLink}\n" +
+ $"{_changelog}");
Dispatcher.UIThread.InvokeAsync(() =>
{
Version = tag_name;
- Debug.WriteLine($"New version detected: {DownloadLink}\n" +
- $"{_changelog}");
});
return true;
}