Skip to content

Commit

Permalink
Minor Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiizor committed Nov 5, 2024
1 parent fd8e59b commit 2d2b56a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ private async Task AddThemes(string[] Search, int Page)

private static int CountMatchingWords(string Text, string[] Pattern)
{
return Text.Split(' ').Count(Word => Pattern.Any(Words => Word.Contains(Words)));
//return Text.Split(' ').Count(Word => Pattern.Any(Words => Word.Contains(Words)));
return Pattern.Count(Word => Text.Split(' ').Any(TextWord => TextWord.Contains(Word)));
}

private async void FullLibraryPage_Loaded(object sender, RoutedEventArgs e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ await Application.Current.Dispatcher.InvokeAsync(async () =>

private static int CountMatchingWords(string Text, string[] Pattern)
{
return Text.Split(' ').Count(Word => Pattern.Any(Words => Word.Contains(Words)));
//return Text.Split(' ').Count(Word => Pattern.Any(Words => Word.Contains(Words)));
return Pattern.Count(Word => Text.Split(' ').Any(TextWord => TextWord.Contains(Word)));
}

private async void FullStorePage_Loaded(object sender, RoutedEventArgs e)
Expand Down

0 comments on commit 2d2b56a

Please sign in to comment.