Explorar el Código

Fix to update stuff

Kenric Nugteren hace 7 meses
padre
commit
be59e0708b
Se han modificado 1 ficheros con 14 adiciones y 17 borrados
  1. 14 17
      prs.shared/Update.cs

+ 14 - 17
prs.shared/Update.cs

@@ -96,25 +96,22 @@ namespace PRS.Shared
             var latestVersion = "";
             var currentVersion = CoreUtils.GetVersion();
             var location = getUpdateLocation();
-            if (!String.IsNullOrWhiteSpace(location))
+            Progress.ShowModal("Checking for Updates", progress =>
             {
-                Progress.ShowModal("Checking for Updates", progress =>
+                if (!string.Equals(currentVersion, "???"))
                 {
-                    if (!string.Equals(currentVersion, "???"))
-                    {
-                        latestVersion = getLatestVersion(location);
-                        Logger.Send(LogType.Information, "",
-                            $"Update Check: Current: {currentVersion} Latest: {latestVersion}");
-
-                        if (!string.IsNullOrWhiteSpace(latestVersion))
-                            if (string.Compare(currentVersion, latestVersion) < 0)
-                            {
-                                var releasenotes = getReleaseNotes(location);
-                                display = ParseReleaseNotes(releasenotes, latestVersion, currentVersion);
-                            }
-                    }
-                });
-            }
+                    latestVersion = getLatestVersion(location);
+                    Logger.Send(LogType.Information, "",
+                        $"Update Check: Current: {currentVersion} Latest: {latestVersion}");
+
+                    if (!string.IsNullOrWhiteSpace(latestVersion))
+                        if (string.Compare(currentVersion, latestVersion) < 0)
+                        {
+                            var releasenotes = getReleaseNotes(location);
+                            display = ParseReleaseNotes(releasenotes, latestVersion, currentVersion);
+                        }
+                }
+            });
 
             if (display.IsNullOrWhiteSpace()) return false;