mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-14 20:54:16 +01:00
sort by search score in plugin installer if opened w/ search text (#2246)
This commit is contained in:
parent
3f724170b2
commit
af1eb275cf
1 changed files with 16 additions and 3 deletions
|
|
@ -285,9 +285,13 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
_ = pluginManager.ReloadPluginMastersAsync();
|
_ = pluginManager.ReloadPluginMastersAsync();
|
||||||
Service<PluginManager>.Get().ScanDevPlugins();
|
Service<PluginManager>.Get().ScanDevPlugins();
|
||||||
|
|
||||||
if (!this.isSearchTextPrefilled) this.searchText = string.Empty;
|
if (!this.isSearchTextPrefilled)
|
||||||
this.sortKind = PluginSortKind.Alphabetical;
|
{
|
||||||
this.filterText = Locs.SortBy_Alphabetical;
|
this.searchText = string.Empty;
|
||||||
|
this.sortKind = PluginSortKind.Alphabetical;
|
||||||
|
this.filterText = Locs.SortBy_Alphabetical;
|
||||||
|
}
|
||||||
|
|
||||||
this.adaptiveSort = true;
|
this.adaptiveSort = true;
|
||||||
|
|
||||||
if (this.updateStatus == OperationStatus.Complete || this.updateStatus == OperationStatus.Idle)
|
if (this.updateStatus == OperationStatus.Complete || this.updateStatus == OperationStatus.Idle)
|
||||||
|
|
@ -363,11 +367,20 @@ internal class PluginInstallerWindow : Window, IDisposable
|
||||||
{
|
{
|
||||||
this.isSearchTextPrefilled = false;
|
this.isSearchTextPrefilled = false;
|
||||||
this.searchText = string.Empty;
|
this.searchText = string.Empty;
|
||||||
|
if (this.sortKind == PluginSortKind.SearchScore)
|
||||||
|
{
|
||||||
|
this.sortKind = PluginSortKind.Alphabetical;
|
||||||
|
this.filterText = Locs.SortBy_Alphabetical;
|
||||||
|
this.ResortPlugins();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.isSearchTextPrefilled = true;
|
this.isSearchTextPrefilled = true;
|
||||||
this.searchText = text;
|
this.searchText = text;
|
||||||
|
this.sortKind = PluginSortKind.SearchScore;
|
||||||
|
this.filterText = Locs.SortBy_SearchScore;
|
||||||
|
this.ResortPlugins();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue