From f7d5aa4bd2681c634860017aea6957cba967a96f Mon Sep 17 00:00:00 2001 From: F K <54195004+fredjk-gh@users.noreply.github.com> Date: Thu, 19 Aug 2021 07:01:46 -0400 Subject: [PATCH] Ensures notify-only plugin configuration UI is rendered (#12) Switching the basic Announcer plugin to implement only `IObservatoryNotifier`, I noticed the config UI went missing. This PR fixes that. --- ObservatoryCore/UI/Views/BasicUIView.axaml.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ObservatoryCore/UI/Views/BasicUIView.axaml.cs b/ObservatoryCore/UI/Views/BasicUIView.axaml.cs index def362b..1b7653d 100644 --- a/ObservatoryCore/UI/Views/BasicUIView.axaml.cs +++ b/ObservatoryCore/UI/Views/BasicUIView.axaml.cs @@ -271,25 +271,25 @@ namespace Observatory.UI.Views Binding = new Binding("Status") }); - Dictionary uniquePlugins = new(); + Dictionary uniquePlugins = new(); foreach(var (plugin, signed) in pluginManager.workerPlugins) { - if (!uniquePlugins.ContainsKey(plugin.Name)) + if (!uniquePlugins.ContainsKey(plugin)) { - uniquePlugins.Add(plugin.Name, + uniquePlugins.Add(plugin, new PluginView() { Name = plugin.Name, Types = new() { typeof(IObservatoryWorker).Name }, Version = plugin.Version, Status = GetStatusText(signed) }); } } foreach (var (plugin, signed) in pluginManager.notifyPlugins) { - if (!uniquePlugins.ContainsKey(plugin.Name)) + if (!uniquePlugins.ContainsKey(plugin)) { - uniquePlugins.Add(plugin.Name, + uniquePlugins.Add(plugin, new PluginView() { Name = plugin.Name, Types = new() { typeof(IObservatoryNotifier).Name }, Version = plugin.Version, Status = GetStatusText(signed) }); } else { - uniquePlugins[plugin.Name].Types.Add(typeof(IObservatoryNotifier).Name); + uniquePlugins[plugin].Types.Add(typeof(IObservatoryNotifier).Name); } } @@ -300,7 +300,7 @@ namespace Observatory.UI.Views #region Plugin Settings - foreach(var plugin in pluginManager.workerPlugins.Select(p => p.plugin)) + foreach(var plugin in uniquePlugins.Keys) { GeneratePluginSettingUI(corePanel, plugin); }