-
Notifications
You must be signed in to change notification settings - Fork 0
Limit sport filters for MVP #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
61b6596
1d2b74a
fc95915
1e14647
ce78fd6
f0d19c9
dd4fa99
a8d5ef4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -176,6 +176,7 @@ fun FeaturedGameCard( | |
| bottomEnd = 16.dp | ||
| ) | ||
| ), | ||
| isFeatured = true, | ||
| onClick = onClick | ||
| ) | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| package com.cornellappdev.score.model | ||
|
|
||
| import androidx.annotation.DrawableRes | ||
| import com.cornellappdev.score.util.isValidSport | ||
| import com.cornellappdev.score.R | ||
|
|
||
| enum class Sport( | ||
|
|
@@ -173,7 +174,7 @@ enum class Sport( | |
| GenderDivision.FEMALE -> Sport.entries.filter { it.gender == GenderDivision.FEMALE || it.gender == GenderDivision.ALL } | ||
| GenderDivision.ALL, | ||
| null -> Sport.entries | ||
| } | ||
| }.filter { isValidSport(it.displayName) } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we need to filter here since we already should've done this in the repository.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does not work if I remove it
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh oops that was definitely wrong of me, I thought that was data coming from the BE, sorry for not looking at that closer. |
||
|
|
||
| return listOf(SportSelection.All) + filteredSports.map { SportSelection.SportSelect(it) } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit:
filterNotNulland thenmapis a bit cleaner here so you don't have to handlenullin the predicate.