Skip to content

Commit

Permalink
ConfigApp: Include Author & Description fields in workshop submission…
Browse files Browse the repository at this point in the history
… search
  • Loading branch information
pongo1231 committed Aug 29, 2023
1 parent 7e6437d commit 825538d
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion ConfigApp/Tabs/WorkshopTab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,26 @@ private void HandleWorkshopSubmissionsSearchFilter()
{
var transformedText = m_SearchBox.Text.Trim().ToLower();
var view = CollectionViewSource.GetDefaultView(m_WorkshopSubmissionItems);
view.Filter = submissionItem => ((WorkshopSubmissionItem)submissionItem).Name.ToLower().Contains(transformedText);
view.Filter = (submissionItem) =>
{
var item = (WorkshopSubmissionItem)submissionItem;
var texts = new string[]
{
item.Name,
item.Author,
item.Description
};

foreach (var text in texts)
{
if (text.ToLower().Contains(transformedText))
{
return true;
}
};

return false;
};
}

private void ParseWorkshopSubmissionsFile(byte[] compressedFileContent)
Expand Down

0 comments on commit 825538d

Please sign in to comment.