Skip to content

Commit

Permalink
pi: correctly clear highlighted categories when clearing the search bar
Browse files Browse the repository at this point in the history
  • Loading branch information
goaaats committed Jun 19, 2024
1 parent a802529 commit 7939223
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Dalamud/Interface/Internal/PluginCategoryManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@ public void ResetContentDirty()
/// <param name="plugins">List of plugins whose categories should be highlighted.</param>
public void SetCategoryHighlightsForPlugins(IEnumerable<PluginManifest> plugins)
{
ArgumentNullException.ThrowIfNull(plugins);

this.highlightedCategoryKinds.Clear();

foreach (var entry in plugins)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3573,7 +3573,7 @@ private void UpdateCategoriesOnSearchChange(string? previousSearchText)
{
if (string.IsNullOrEmpty(this.searchText))
{
this.categoryManager.SetCategoryHighlightsForPlugins(null);
this.categoryManager.SetCategoryHighlightsForPlugins(Array.Empty<RemotePluginManifest>());

// Reset here for good measure, as we're returning from a search
this.openPluginCollapsibles.Clear();
Expand Down

0 comments on commit 7939223

Please sign in to comment.