Skip to content

Commit

Permalink
Fixed bug not searching in Map and Filename
Browse files Browse the repository at this point in the history
  • Loading branch information
netquick committed Jul 28, 2024
1 parent 778fe44 commit 7eeda5c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion DeFRaG_Helper/ViewModels/MapViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ private async void ApplyFilters()
await Task.Run(() =>
{
var filteredMaps = Maps.Where(map =>
(string.IsNullOrEmpty(SearchText) || map.Name.Contains(SearchText, StringComparison.OrdinalIgnoreCase)) &&
(string.IsNullOrEmpty(SearchText) ||
map.Name.Contains(SearchText, StringComparison.OrdinalIgnoreCase) ||
map.Mapname.Contains(SearchText, StringComparison.OrdinalIgnoreCase) ||
map.Filename.Contains(SearchText, StringComparison.OrdinalIgnoreCase)) &&
(!ShowFavorites || map.IsFavorite == 1) &&
(!ShowInstalled || map.IsInstalled == 1) &&
(!ShowDownloaded || map.IsDownloaded == 1))
Expand All @@ -156,6 +159,7 @@ await Task.Run(() =>
}



public void LoadDisplayedMapsSubset(List<Map> sourceMaps, int startIndex, int count)
{
for (int i = startIndex; i < Math.Min(startIndex + count, sourceMaps.Count); i++)
Expand Down

0 comments on commit 7eeda5c

Please sign in to comment.