App: Fix Version comparison in auto updater

This commit is contained in:
2024-03-06 09:19:53 +01:00
parent e7375c7f9f
commit 271e085fdf

View File

@ -198,7 +198,7 @@ namespace Elwig {
public static async Task CheckForUpdates() { public static async Task CheckForUpdates() {
if (Config.UpdateUrl == null) return; if (Config.UpdateUrl == null) return;
var latest = await Utils.GetLatestInstallerUrl(Config.UpdateUrl); var latest = await Utils.GetLatestInstallerUrl(Config.UpdateUrl);
if (latest != null && latest.Value.Version != Version) { if (latest != null && new Version(latest.Value.Version) > new Version(Version)) {
await MainDispatcher.BeginInvoke(() => { await MainDispatcher.BeginInvoke(() => {
var d = new UpdateDialog(latest.Value.Version, latest.Value.Url, latest.Value.Size); var d = new UpdateDialog(latest.Value.Version, latest.Value.Url, latest.Value.Size);
if (d.ShowDialog() == true) { if (d.ShowDialog() == true) {