feat: make search work in changelog tab

This commit is contained in:
Aireil 2023-03-18 16:15:10 +01:00
parent d7c510647e
commit 1d7580122c
No known key found for this signature in database
GPG key ID: EA9CA38B48706D3D

View file

@ -909,7 +909,8 @@ internal class PluginInstallerWindow : Window, IDisposable
changelogs = this.dalamudChangelogManager.Changelogs.OfType<PluginChangelogEntry>();
}
var sortedChangelogs = changelogs?.OrderByDescending(x => x.Date).ToList();
var sortedChangelogs = changelogs?.Where(x => this.searchText.IsNullOrWhitespace() || x.Title.ToLowerInvariant().Contains(this.searchText.ToLowerInvariant()))
.OrderByDescending(x => x.Date).ToList();
if (sortedChangelogs == null || !sortedChangelogs.Any())
{