From e7f7250c086d071b59607ab92461ee4b7f93ca15 Mon Sep 17 00:00:00 2001 From: Xjph Date: Mon, 4 Apr 2022 21:22:51 -0230 Subject: [PATCH] Correcting version check --- ObservatoryCore/UI/ViewModels/CoreViewModel.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ObservatoryCore/UI/ViewModels/CoreViewModel.cs b/ObservatoryCore/UI/ViewModels/CoreViewModel.cs index 52037fc..d09a877 100644 --- a/ObservatoryCore/UI/ViewModels/CoreViewModel.cs +++ b/ObservatoryCore/UI/ViewModels/CoreViewModel.cs @@ -179,7 +179,9 @@ namespace Observatory.UI.ViewModels foreach (var release in releases) { - if (release.GetProperty("tag_name").ToString().CompareTo("v" + System.Reflection.Assembly.GetEntryAssembly().GetName().Version.ToString()) > 0) + var ver = release.GetProperty("tag_name").ToString()[1..].Split('.').Select(verString => int.Parse(verString)).ToArray(); + Version version = new(ver[0], ver[1], ver[2], ver[3]); + if (version > System.Reflection.Assembly.GetEntryAssembly().GetName().Version) { return true; }