diff --git a/src/Files.App/Helpers/Application/AppLifecycleHelper.cs b/src/Files.App/Helpers/Application/AppLifecycleHelper.cs index ea722d1e378a..9998ab269836 100644 --- a/src/Files.App/Helpers/Application/AppLifecycleHelper.cs +++ b/src/Files.App/Helpers/Application/AppLifecycleHelper.cs @@ -128,9 +128,11 @@ await Task.WhenAll( FileTagsHelper.UpdateTagsDb(); - // Release notes tab doesn't open unless this is awaited - // Auto update doesn't work unless this is awaited - await CheckAppUpdate(); + _ = Task.Run(async () => + { + // The follwing method invokes UI thread, so we run it in a separate task + await CheckAppUpdate(); + }); static Task OptionalTaskAsync(Task task, bool condition) { @@ -158,8 +160,11 @@ public static async Task CheckAppUpdate() updateService.AreReleaseNotesAvailable && !ViewedReleaseNotes) { - await Ioc.Default.GetRequiredService().OpenReleaseNotes.ExecuteAsync(); - ViewedReleaseNotes = true; + await MainWindow.Instance.DispatcherQueue.EnqueueOrInvokeAsync(async () => + { + await Ioc.Default.GetRequiredService().OpenReleaseNotes.ExecuteAsync(); + ViewedReleaseNotes = true; + }); } await updateService.CheckForUpdatesAsync();