From af1eb275cf8255e0d1db6c9af0be1080c0481917 Mon Sep 17 00:00:00 2001 From: Cytraen <60638768+Cytraen@users.noreply.github.com> Date: Tue, 15 Apr 2025 15:33:28 -0400 Subject: [PATCH] sort by search score in plugin installer if opened w/ search text (#2246) --- .../PluginInstaller/PluginInstallerWindow.cs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs index c2efd2d68..eca3672c2 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs @@ -285,9 +285,13 @@ internal class PluginInstallerWindow : Window, IDisposable _ = pluginManager.ReloadPluginMastersAsync(); Service.Get().ScanDevPlugins(); - if (!this.isSearchTextPrefilled) this.searchText = string.Empty; - this.sortKind = PluginSortKind.Alphabetical; - this.filterText = Locs.SortBy_Alphabetical; + if (!this.isSearchTextPrefilled) + { + this.searchText = string.Empty; + this.sortKind = PluginSortKind.Alphabetical; + this.filterText = Locs.SortBy_Alphabetical; + } + this.adaptiveSort = true; if (this.updateStatus == OperationStatus.Complete || this.updateStatus == OperationStatus.Idle) @@ -363,11 +367,20 @@ internal class PluginInstallerWindow : Window, IDisposable { this.isSearchTextPrefilled = false; this.searchText = string.Empty; + if (this.sortKind == PluginSortKind.SearchScore) + { + this.sortKind = PluginSortKind.Alphabetical; + this.filterText = Locs.SortBy_Alphabetical; + this.ResortPlugins(); + } } else { this.isSearchTextPrefilled = true; this.searchText = text; + this.sortKind = PluginSortKind.SearchScore; + this.filterText = Locs.SortBy_SearchScore; + this.ResortPlugins(); } }