Skip to content

Commit

Permalink
updater messages fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiye committed Sep 30, 2023
1 parent 956d916 commit cd1ab3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Fb2Kindle/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down
3 changes: 3 additions & 0 deletions Fb2Kindle/Updater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<GitHubRelease[]>();
if (releases == null || releases.Length == 0)
Expand All @@ -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;
}

Expand Down

0 comments on commit cd1ab3f

Please sign in to comment.