From fe0b0895b422ff41d0cf90e84042721e6ee4e305 Mon Sep 17 00:00:00 2001 From: Chris Kaczor Date: Mon, 30 Sep 2024 18:12:00 -0400 Subject: [PATCH] Fix async --- SettingsWindow/UpdateSettingsPanel.xaml.cs | 2 +- UpdateCheck.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/SettingsWindow/UpdateSettingsPanel.xaml.cs b/SettingsWindow/UpdateSettingsPanel.xaml.cs index d099709..6b1ef07 100644 --- a/SettingsWindow/UpdateSettingsPanel.xaml.cs +++ b/SettingsWindow/UpdateSettingsPanel.xaml.cs @@ -19,7 +19,7 @@ public partial class UpdateSettingsPanel Cursor = Cursors.Wait; - UpdateCheck.DisplayUpdateInformation(true); + UpdateCheck.DisplayUpdateInformation(true).Wait(); Cursor = cursor; } diff --git a/UpdateCheck.cs b/UpdateCheck.cs index cc28fe6..9c1997d 100644 --- a/UpdateCheck.cs +++ b/UpdateCheck.cs @@ -1,5 +1,6 @@ using NuGet.Versioning; using Serilog; +using System.Threading.Tasks; using System.Windows; using Velopack; using Velopack.Sources; @@ -16,7 +17,7 @@ namespace WorldClockStatusWindow public static bool IsInstalled => UpdateManager.IsInstalled; - public static async void DisplayUpdateInformation(bool showIfCurrent) + public static async Task DisplayUpdateInformation(bool showIfCurrent) { UpdateInfo newVersion = null;