Skip to content

Commit a3d73dd

Browse files
authored
Code Quality: Fixed an issue where the execution order of post-enumeration might be different in ShellViewModel (#15792)
1 parent a3e49e2 commit a3d73dd

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Files.App/ViewModels/ShellViewModel.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,9 +1738,13 @@ await Task.Run(async () =>
17381738

17391739
await OrderFilesAndFoldersAsync();
17401740
await ApplyFilesAndFoldersChangesAsync();
1741-
await dispatcherQueue.EnqueueOrInvokeAsync(CheckForSolutionFile, Microsoft.UI.Dispatching.DispatcherQueuePriority.Low);
1742-
await dispatcherQueue.EnqueueOrInvokeAsync(GetDesktopIniFileData, Microsoft.UI.Dispatching.DispatcherQueuePriority.Low);
1743-
await dispatcherQueue.EnqueueOrInvokeAsync(CheckForBackgroundImage, Microsoft.UI.Dispatching.DispatcherQueuePriority.Low);
1741+
await dispatcherQueue.EnqueueOrInvokeAsync(() =>
1742+
{
1743+
CheckForSolutionFile();
1744+
GetDesktopIniFileData();
1745+
CheckForBackgroundImage();
1746+
},
1747+
Microsoft.UI.Dispatching.DispatcherQueuePriority.Low);
17441748
});
17451749

17461750
rootFolder ??= await FilesystemTasks.Wrap(() => StorageFileExtensions.DangerousGetFolderFromPathAsync(path));

0 commit comments

Comments
 (0)