mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Plugin Store search works after refresh button clicked
This commit is contained in:
parent
cd06f13d76
commit
eaaf7c2e4a
1 changed files with 17 additions and 4 deletions
|
|
@ -9,6 +9,7 @@ using Flow.Launcher.ViewModel;
|
||||||
using ModernWpf;
|
using ModernWpf;
|
||||||
using ModernWpf.Controls;
|
using ModernWpf.Controls;
|
||||||
using System;
|
using System;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Security.Policy;
|
using System.Security.Policy;
|
||||||
|
|
@ -58,12 +59,24 @@ namespace Flow.Launcher
|
||||||
pluginListView = (CollectionView)CollectionViewSource.GetDefaultView(Plugins.ItemsSource);
|
pluginListView = (CollectionView)CollectionViewSource.GetDefaultView(Plugins.ItemsSource);
|
||||||
pluginListView.Filter = PluginListFilter;
|
pluginListView.Filter = PluginListFilter;
|
||||||
|
|
||||||
pluginStoreView = (CollectionView)CollectionViewSource.GetDefaultView(StoreListBox.ItemsSource);
|
pluginStoreView = (CollectionView)CollectionViewSource.GetDefaultView(StoreListBox.ItemsSource);
|
||||||
pluginStoreView.Filter = PluginStoreFilter;
|
pluginStoreView.Filter = PluginStoreFilter;
|
||||||
|
|
||||||
|
viewModel.PropertyChanged += new PropertyChangedEventHandler(SettingsWindowViewModelChanged);
|
||||||
|
|
||||||
InitializePosition();
|
InitializePosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SettingsWindowViewModelChanged(object sender, PropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.PropertyName == nameof(viewModel.ExternalPlugins))
|
||||||
|
{
|
||||||
|
pluginStoreView = (CollectionView)CollectionViewSource.GetDefaultView(StoreListBox.ItemsSource);
|
||||||
|
pluginStoreView.Filter = PluginStoreFilter;
|
||||||
|
pluginStoreView.Refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void OnSelectPythonPathClick(object sender, RoutedEventArgs e)
|
private void OnSelectPythonPathClick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var selectedFile = viewModel.GetFileFromDialog(
|
var selectedFile = viewModel.GetFileFromDialog(
|
||||||
|
|
@ -257,9 +270,9 @@ namespace Flow.Launcher
|
||||||
{
|
{
|
||||||
var confirmResult = MessageBox.Show(
|
var confirmResult = MessageBox.Show(
|
||||||
InternationalizationManager.Instance.GetTranslation("clearlogfolderMessage"),
|
InternationalizationManager.Instance.GetTranslation("clearlogfolderMessage"),
|
||||||
InternationalizationManager.Instance.GetTranslation("clearlogfolder"),
|
InternationalizationManager.Instance.GetTranslation("clearlogfolder"),
|
||||||
MessageBoxButton.YesNo);
|
MessageBoxButton.YesNo);
|
||||||
|
|
||||||
if (confirmResult == MessageBoxResult.Yes)
|
if (confirmResult == MessageBoxResult.Yes)
|
||||||
{
|
{
|
||||||
viewModel.ClearLogFolder();
|
viewModel.ClearLogFolder();
|
||||||
|
|
@ -390,7 +403,7 @@ namespace Flow.Launcher
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private CollectionView pluginListView;
|
private CollectionView pluginListView;
|
||||||
private CollectionView pluginStoreView;
|
private CollectionView pluginStoreView;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue