From 56fc4dd2f61e7b8767154e9e37c8f7462c694901 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Thu, 13 Aug 2026 00:08:05 -0500 Subject: [PATCH] Simplify creation of the tasks collection --- src/ManagedShell.WindowsTasks/Tasks.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/ManagedShell.WindowsTasks/Tasks.cs b/src/ManagedShell.WindowsTasks/Tasks.cs index 5b327a46..1deb5427 100644 --- a/src/ManagedShell.WindowsTasks/Tasks.cs +++ b/src/ManagedShell.WindowsTasks/Tasks.cs @@ -21,16 +21,7 @@ public Tasks(TasksService tasksService) public ICollectionView CreateGroupedWindowsCollection() { - ICollectionView collection; - if (groupedWindows == null) - { - collection = CollectionViewSource.GetDefaultView(_tasksService.Windows); - } - else - { - collection = new CollectionViewSource { Source = groupedWindows.SourceCollection }.View; - } - + ICollectionView collection = new ListCollectionView(_tasksService.Windows); collection.GroupDescriptions.Add(new PropertyGroupDescription("Category")); collection.CollectionChanged += groupedWindows_Changed; collection.Filter = groupedWindows_Filter;