mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 11:17:53 +01:00
[Settings][PTRun]Fix plugin disabled error with search (#18534)
This commit is contained in:
committed by
GitHub
parent
6f306e1259
commit
29f0ae0395
@@ -94,11 +94,6 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var plugin in Plugins)
|
|
||||||
{
|
|
||||||
plugin.PropertyChanged += OnPluginInfoChange;
|
|
||||||
}
|
|
||||||
|
|
||||||
SearchPluginsCommand = new RelayCommand(SearchPlugins);
|
SearchPluginsCommand = new RelayCommand(SearchPlugins);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -412,6 +407,10 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
|||||||
if (_plugins == null)
|
if (_plugins == null)
|
||||||
{
|
{
|
||||||
_plugins = new ObservableCollection<PowerLauncherPluginViewModel>(settings.Plugins.Select(x => new PowerLauncherPluginViewModel(x, isDark)));
|
_plugins = new ObservableCollection<PowerLauncherPluginViewModel>(settings.Plugins.Select(x => new PowerLauncherPluginViewModel(x, isDark)));
|
||||||
|
foreach (var plugin in Plugins)
|
||||||
|
{
|
||||||
|
plugin.PropertyChanged += OnPluginInfoChange;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return _plugins;
|
return _plugins;
|
||||||
@@ -420,7 +419,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
|||||||
|
|
||||||
public bool ShowAllPluginsDisabledWarning
|
public bool ShowAllPluginsDisabledWarning
|
||||||
{
|
{
|
||||||
get => EnablePowerLauncher && Plugins.Any() && Plugins.All(x => x.Disabled);
|
get => EnablePowerLauncher && settings.Plugins.Any() && settings.Plugins.All(x => x.Disabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ShowPluginsLoadingMessage
|
public bool ShowPluginsLoadingMessage
|
||||||
|
|||||||
Reference in New Issue
Block a user