Skip to content
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

Don't select seasons that haven't started yet #3250

Merged
merged 3 commits into from
Sep 29, 2024
Merged

Conversation

BlackYps
Copy link
Collaborator

Currently the client will select the next season as soon as it exists, even if the currently ongoing season hasn't finished yet.

@BlackYps
Copy link
Collaborator Author

Since when are the tests flaky? I first had one unrelated test failing, now three. Locally I had one successful run, but also a fail.

@Sheikah45
Copy link
Member

They have been mildly flaky for a bit

Comment on lines 71 to 73
Optional<LeagueSeason> currentSeason = seasons.stream()
.filter(season -> season.startDate().isBefore(OffsetDateTime.now()))
.findFirst();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we filtering here instead of in the api call?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I didn't think of doing it in the api call.
Theoretically this has the advantage that the future season is available in the picker, but I don't see any real advantage in that.

@Sheikah45 Sheikah45 merged commit efd4ce9 into develop Sep 29, 2024
3 checks passed
@Sheikah45 Sheikah45 deleted the bugfix/season-picker branch September 29, 2024 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants