Skip to content

Commit

Permalink
[Settings][PTRun]Fix plugin disabled error with search (#18534)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidegiacometti authored Jun 2, 2022
1 parent 6f306e1 commit 29f0ae0
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,6 @@ public PowerLauncherViewModel(PowerLauncherSettings settings, ISettingsRepositor
break;
}

foreach (var plugin in Plugins)
{
plugin.PropertyChanged += OnPluginInfoChange;
}

SearchPluginsCommand = new RelayCommand(SearchPlugins);
}

Expand Down Expand Up @@ -412,6 +407,10 @@ public ObservableCollection<PowerLauncherPluginViewModel> Plugins
if (_plugins == null)
{
_plugins = new ObservableCollection<PowerLauncherPluginViewModel>(settings.Plugins.Select(x => new PowerLauncherPluginViewModel(x, isDark)));
foreach (var plugin in Plugins)
{
plugin.PropertyChanged += OnPluginInfoChange;
}
}

return _plugins;
Expand All @@ -420,7 +419,7 @@ public ObservableCollection<PowerLauncherPluginViewModel> Plugins

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
Expand Down

0 comments on commit 29f0ae0

Please sign in to comment.