Skip to content

Commit

Permalink
Fix sometimes props not loading
Browse files Browse the repository at this point in the history
  • Loading branch information
hez2010 committed Sep 3, 2021
1 parent e579722 commit c6ca824
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Files/ViewModels/ItemViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,6 @@ public async Task LoadExtendedItemProperties(ListedItem item, uint thumbnailSize
return;
}

item.ItemPropertiesInitialized = true;
itemLoadQueue[item.ItemPath] = false;

var cts = loadPropsCTS;
Expand All @@ -916,6 +915,7 @@ public async Task LoadExtendedItemProperties(ListedItem item, uint thumbnailSize
await Task.Run(async () =>
{
await itemLoadEvent.WaitAsync(cts.Token);
item.ItemPropertiesInitialized = true;

if (itemLoadQueue.TryGetValue(item.ItemPath, out var canceled) && canceled)
{
Expand Down Expand Up @@ -1045,7 +1045,7 @@ await FilesystemTasks.Wrap(() => CoreApplication.MainView.DispatcherQueue.Enqueu
}
catch (OperationCanceledException)
{
item.ItemPropertiesInitialized = false;
// ignored
}
finally
{
Expand Down

0 comments on commit c6ca824

Please sign in to comment.