From 825538d7ab522b36ae0ac881c28e014c824eef02 Mon Sep 17 00:00:00 2001 From: pongo1231 Date: Tue, 29 Aug 2023 19:14:01 +0000 Subject: [PATCH] ConfigApp: Include Author & Description fields in workshop submission search --- ConfigApp/Tabs/WorkshopTab.cs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/ConfigApp/Tabs/WorkshopTab.cs b/ConfigApp/Tabs/WorkshopTab.cs index d6a9d51bf..d090609e2 100644 --- a/ConfigApp/Tabs/WorkshopTab.cs +++ b/ConfigApp/Tabs/WorkshopTab.cs @@ -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)