File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
src/Files.App/Helpers/Application Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -128,9 +128,11 @@ await Task.WhenAll(
128
128
129
129
FileTagsHelper . UpdateTagsDb ( ) ;
130
130
131
- // Release notes tab doesn't open unless this is awaited
132
- // Auto update doesn't work unless this is awaited
133
- await CheckAppUpdate ( ) ;
131
+ _ = Task . Run ( async ( ) =>
132
+ {
133
+ // The follwing method invokes UI thread, so we run it in a separate task
134
+ await CheckAppUpdate ( ) ;
135
+ } ) ;
134
136
135
137
static Task OptionalTaskAsync ( Task task , bool condition )
136
138
{
@@ -158,8 +160,11 @@ public static async Task CheckAppUpdate()
158
160
updateService . AreReleaseNotesAvailable &&
159
161
! ViewedReleaseNotes )
160
162
{
161
- await Ioc . Default . GetRequiredService < ICommandManager > ( ) . OpenReleaseNotes . ExecuteAsync ( ) ;
162
- ViewedReleaseNotes = true ;
163
+ await MainWindow . Instance . DispatcherQueue . EnqueueOrInvokeAsync ( async ( ) =>
164
+ {
165
+ await Ioc . Default . GetRequiredService < ICommandManager > ( ) . OpenReleaseNotes . ExecuteAsync ( ) ;
166
+ ViewedReleaseNotes = true ;
167
+ } ) ;
163
168
}
164
169
165
170
await updateService . CheckForUpdatesAsync ( ) ;
You can’t perform that action at this time.
0 commit comments