Skip to content

Commit 3473abd

Browse files
committed
Fixed the deadlock
1 parent 28447d8 commit 3473abd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Files.App/ViewModels/HomeViewModel.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,10 @@ public void RefreshWidgetList()
115115
ReloadWidgets();
116116
}
117117

118-
public Task RefreshWidgetProperties()
118+
public async Task RefreshWidgetProperties()
119119
{
120-
return Task.WhenAll(WidgetItems.Select(w => w.WidgetItemModel.RefreshWidgetAsync()));
120+
foreach (var viewModel in WidgetItems.Select(x => x.WidgetItemModel))
121+
await viewModel.RefreshWidgetAsync();
121122
}
122123

123124
private bool InsertWidget(WidgetContainerItem widgetModel, int atIndex)

0 commit comments

Comments
 (0)