Skip to content

Commit 03e7668

Browse files
committed
Code Quality: Await CheckAppUpdate to fix release notes tab
1 parent 2a34261 commit 03e7668

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/Files.App/Helpers/Application/AppLifecycleHelper.cs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,15 @@ await Task.WhenAll(
118118
OptionalTaskAsync(App.FileTagsManager.UpdateFileTagsAsync(), generalSettingsService.ShowFileTagsSection),
119119
jumpListService.InitializeAsync(),
120120
addItemService.InitializeAsync(),
121-
ContextMenu.WarmUpQueryContextMenuAsync(),
122-
CheckAppUpdate()
121+
ContextMenu.WarmUpQueryContextMenuAsync()
123122
);
124123
});
125124

126125
FileTagsHelper.UpdateTagsDb();
127126

127+
// Release notes tab doesn't open unless this is awaited
128+
await CheckAppUpdate();
129+
128130
static Task OptionalTaskAsync(Task task, bool condition)
129131
{
130132
if (condition)
@@ -155,9 +157,14 @@ public static async Task CheckAppUpdate()
155157
ViewedReleaseNotes = true;
156158
}
157159

158-
await updateService.CheckForUpdatesAsync();
159-
await updateService.DownloadMandatoryUpdatesAsync();
160-
await updateService.CheckAndUpdateFilesLauncherAsync();
160+
_ = Task.Run(async () =>
161+
{
162+
await Task.WhenAll(
163+
updateService.CheckForUpdatesAsync(),
164+
updateService.DownloadMandatoryUpdatesAsync(),
165+
updateService.CheckAndUpdateFilesLauncherAsync()
166+
);
167+
});
161168
}
162169

163170
/// <summary>

0 commit comments

Comments
 (0)