fix: order upcoming tournaments by start time first#3078
Merged
Conversation
c35015b to
e49c6ff
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts tournament list sorting so upcoming tournaments prioritize those starting soonest, and refactors the comparator chain for readability.
Changes:
- Passes a
_ViewModeinto_TournamentListBodyso sorting can differ by tab (completed/ongoing/upcoming). - Updates system tournament sorting to order upcoming tournaments by
startsAtfirst, usingComparatorExtension.then. - (Unrelated/accidental) Introduces unresolved merge-conflict markers in a widget test file.
Reviewed changes
Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
lib/src/view/tournament/tournament_list_screen.dart |
Adds viewMode and updates sorting logic to put upcoming tournaments with earlier start times first. |
test/view/analysis/retro_screen_test.dart |
Contains unresolved merge-conflict markers and an unused import introduced by the conflict. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Also, use https://pub.dev/documentation/collection/latest/collection/ComparatorExtension/then.html to make the whole comparison chain a bit more elegant
e49c6ff to
320e942
Compare
veloce
approved these changes
Apr 30, 2026
veloce
left a comment
Contributor
There was a problem hiding this comment.
I don't remember why I sorted them that way in the first place. Sorting them by start date definitely makes sense so I trust you on this. Thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Users looking at upcoming tournaments most of the time want to enter one that starts soon, so we should order by start date here.
Also, use
https://pub.dev/documentation/collection/latest/collection/ComparatorExtension/then.html to make the whole comparison chain a bit more elegant
Before:
After: