Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions src/Files.App/Helpers/Application/AppLifecycleHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -158,8 +160,11 @@ public static async Task CheckAppUpdate()
updateService.AreReleaseNotesAvailable &&
!ViewedReleaseNotes)
{
await Ioc.Default.GetRequiredService<ICommandManager>().OpenReleaseNotes.ExecuteAsync();
ViewedReleaseNotes = true;
await MainWindow.Instance.DispatcherQueue.EnqueueOrInvokeAsync(async () =>
{
await Ioc.Default.GetRequiredService<ICommandManager>().OpenReleaseNotes.ExecuteAsync();
ViewedReleaseNotes = true;
});
}

await updateService.CheckForUpdatesAsync();
Expand Down
Loading