From cd1ab3f14aea96432c6673726a0a08156f31d2b7 Mon Sep 17 00:00:00 2001 From: Sergiy Egoshyn Date: Sat, 30 Sep 2023 13:15:16 +0300 Subject: [PATCH] updater messages fix --- Fb2Kindle/Program.cs | 3 --- Fb2Kindle/Updater.cs | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Fb2Kindle/Program.cs b/Fb2Kindle/Program.cs index 30f73e0..e21173d 100644 --- a/Fb2Kindle/Program.cs +++ b/Fb2Kindle/Program.cs @@ -222,10 +222,7 @@ public static void Main(string[] args) { } if (currentSettings.CheckUpdates) { - Util.WriteLine(); - Util.WriteLine("Checking for updates...", ConsoleColor.White); Updater.CheckForUpdates(false); - Util.WriteLine(); } } diff --git a/Fb2Kindle/Updater.cs b/Fb2Kindle/Updater.cs index b5eb770..9d9d986 100644 --- a/Fb2Kindle/Updater.cs +++ b/Fb2Kindle/Updater.cs @@ -78,6 +78,8 @@ internal static void CheckForUpdates(bool silent) { string newVersionUrl = null; bool update; try { + Util.WriteLine(); + Util.Write("Checking for updates... ", ConsoleColor.White); var jsonString = GetJsonData($"https://api.github.com/repos/{GITHUB_LANDING_PAGE}/releases").TrimEnd(); var releases = jsonString.FromJson(); if (releases == null || releases.Length == 0) @@ -95,6 +97,7 @@ internal static void CheckForUpdates(bool silent) { } if (string.Compare(CurrentVersion, newVersion, StringComparison.Ordinal) >= 0) { + Util.WriteLine("You have the latest version.", ConsoleColor.White); return; }