Skip to content

Commit 15cdfc7

Browse files
committed
Fix up 2
1 parent dda6d97 commit 15cdfc7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Files.App/ViewModels/UserControls/Widgets/QuickAccessWidgetViewModel.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,16 @@ private async Task UpdateCollectionAsync(NotifyCollectionChangedEventArgs e)
172172
// case NotifyCollectionChangedAction.Reset:
173173
default:
174174
{
175-
var items = QuickAccessService.PinnedFolders;
175+
var items = QuickAccessService.PinnedFolders.ToList();
176176
if (!items.SequenceEqual(Items))
177177
{
178178
Items.Clear();
179179
foreach (var item in items)
180180
{
181-
var cardItem = new WidgetFolderCardItem(item, SystemIO.Path.GetFileName(item.Text), true) { Path = item.Path };
181+
if (item is not LocationItem locationItem)
182+
continue;
183+
184+
var cardItem = new WidgetFolderCardItem(locationItem, SystemIO.Path.GetFileName(locationItem.Text), true) { Path = locationItem.Path };
182185
AddItemToCollection(cardItem);
183186
}
184187
}

0 commit comments

Comments
 (0)