Merge pull request #1527 from Flow-Launcher/refresh_grouping

fix grouping disappear when item refreshed in plugin store
This commit is contained in:
Kevin Zhang 2022-11-11 00:03:44 -06:00 committed by GitHub
commit 9ac5d42688
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View file

@ -48,6 +48,12 @@
<scm:SortDescription PropertyName="Source" />
</CollectionViewSource.SortDescriptions>
</CollectionViewSource>
<CollectionViewSource x:Key="PluginStoreCollectionView"
Source="{Binding ExternalPlugins}">
<CollectionViewSource.GroupDescriptions>
<PropertyGroupDescription PropertyName="Category"></PropertyGroupDescription>
</CollectionViewSource.GroupDescriptions>
</CollectionViewSource>
<Style x:Key="StoreItemFocusVisualStyleKey">
<Setter Property="Control.Template">
@ -1450,7 +1456,7 @@
Margin="4,0,0,0"
Padding="0,0,18,0"
ItemContainerStyle="{StaticResource StoreList}"
ItemsSource="{Binding ExternalPlugins}"
ItemsSource="{Binding Source={StaticResource PluginStoreCollectionView}}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
SelectionMode="Single"
Style="{DynamicResource StoreListStyle}"

View file

@ -44,10 +44,6 @@ namespace Flow.Launcher
API = api;
InitializePosition();
InitializeComponent();
CollectionView view = (CollectionView)CollectionViewSource.GetDefaultView(StoreListBox.ItemsSource);
PropertyGroupDescription groupDescription = new PropertyGroupDescription("Category");
view.GroupDescriptions.Add(groupDescription);
}
#region General