Skip to content

Commit

Permalink
Fixed issue with filters not filtering correctly
Browse files Browse the repository at this point in the history
Fixed issue with filters not filtering correctly
  • Loading branch information
nit0107 committed Apr 24, 2024
1 parent 25a35d3 commit 62bc74f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions game/lib/challenges/challenges_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -198,21 +198,21 @@ class _ChallengesPageState extends State<ChallengesPage> {
if (searchTerm?.length == 0) {
eventMatchesSearchText = true;
if (widget.myDifficulty?.length == 0 ||
selectedDifficulty == event.difficulty?.name)
widget.myDifficulty == event.difficulty?.name)
eventMatchesDifficultySelection = true;
else
eventMatchesDifficultySelection = false;

if (widget.myLocations?.isNotEmpty ?? false) {
if (selectedLocations.contains(challengeLocation))
if (widget.myLocations?.contains(challengeLocation) ?? false)
eventMatchesLocationSelection = true;
else
eventMatchesLocationSelection = false;
} else
eventMatchesLocationSelection = true;

if (widget.myCategories?.isNotEmpty ?? false) {
if (selectedCategories.contains(event.category?.name))
if (widget.myCategories?.contains(event.category?.name) ?? false)
eventMatchesCategorySelection = true;
else
eventMatchesCategorySelection = false;
Expand Down

0 comments on commit 62bc74f

Please sign in to comment.