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(
128128
129129 FileTagsHelper . UpdateTagsDb ( ) ;
130130
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+ } ) ;
134136
135137 static Task OptionalTaskAsync ( Task task , bool condition )
136138 {
@@ -158,8 +160,11 @@ public static async Task CheckAppUpdate()
158160 updateService . AreReleaseNotesAvailable &&
159161 ! ViewedReleaseNotes )
160162 {
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+ } ) ;
163168 }
164169
165170 await updateService . CheckForUpdatesAsync ( ) ;
You can’t perform that action at this time.
0 commit comments