[Settings][PTRun]Fix plugin disabled error with search (#18534)
This commit is contained in:
Родитель
6f306e1259
Коммит
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
|
||||||
|
|
Загрузка…
Ссылка в новой задаче