From 79392230c462dc4dcbe46be7ea82eb6a06e6bff2 Mon Sep 17 00:00:00 2001 From: goat Date: Wed, 19 Jun 2024 22:48:38 +0200 Subject: [PATCH] pi: correctly clear highlighted categories when clearing the search bar --- Dalamud/Interface/Internal/PluginCategoryManager.cs | 2 ++ .../Internal/Windows/PluginInstaller/PluginInstallerWindow.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dalamud/Interface/Internal/PluginCategoryManager.cs b/Dalamud/Interface/Internal/PluginCategoryManager.cs index 62e7cd97d..ec2a1c15b 100644 --- a/Dalamud/Interface/Internal/PluginCategoryManager.cs +++ b/Dalamud/Interface/Internal/PluginCategoryManager.cs @@ -373,6 +373,8 @@ internal class PluginCategoryManager /// List of plugins whose categories should be highlighted. public void SetCategoryHighlightsForPlugins(IEnumerable plugins) { + ArgumentNullException.ThrowIfNull(plugins); + this.highlightedCategoryKinds.Clear(); foreach (var entry in plugins) diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs index 1c64e9baa..3ceb19afa 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs @@ -3573,7 +3573,7 @@ internal class PluginInstallerWindow : Window, IDisposable { if (string.IsNullOrEmpty(this.searchText)) { - this.categoryManager.SetCategoryHighlightsForPlugins(null); + this.categoryManager.SetCategoryHighlightsForPlugins(Array.Empty()); // Reset here for good measure, as we're returning from a search this.openPluginCollapsibles.Clear();