-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
Broadcast player results screen #1253
Merged
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
1e8253b
Add player results screen
julien4215 0af48bd
Use slugs instead of round url to share game pgn
julien4215 56075dc
Rename federation ID to names variable
julien4215 0b99e6b
Fix conflicts with upstream
julien4215 cf3a3de
Restore list color order for broadcast players
julien4215 1b2ed99
Use circular indicator instead of board shimmer
julien4215 28a5e39
Listen only to the name of the round
julien4215 e845066
Fix color of BOT title
julien4215 c2f59b6
Make players results accessible from broadcast game screen
julien4215 387c057
Fix null value error on broadcast game screen
julien4215 1cb097b
Check if player information is loaded
julien4215 4052bb5
Fix conflicts with upstream
julien4215 4e9ad45
Use providers with selectAsync to get values from broadcast round
julien4215 7c4098c
Improve score sorting on broadcast tab players
julien4215 b623b3f
Remove useless Column widget
julien4215 10cb336
Don't show a default title if title is not yet loaded
julien4215 b410cbe
Rename some broadcast variables
julien4215 c5d8fdc
Fix conflicts with upstream
julien4215 795391e
Merge upstream to use the new Dart formatter
julien4215 c264d98
Merge main branch from upstream
julien4215 5ad9246
Use the new flag asset
julien4215 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
30 changes: 30 additions & 0 deletions
30
lib/src/view/broadcast/broadcast_game_screen_providers.dart
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import 'package:flutter_riverpod/flutter_riverpod.dart'; | ||
import 'package:lichess_mobile/src/model/broadcast/broadcast.dart'; | ||
import 'package:lichess_mobile/src/model/broadcast/broadcast_round_controller.dart'; | ||
import 'package:lichess_mobile/src/model/common/id.dart'; | ||
import 'package:riverpod_annotation/riverpod_annotation.dart'; | ||
|
||
part 'broadcast_game_screen_providers.g.dart'; | ||
|
||
@riverpod | ||
Future<BroadcastGame> broadcastGame( | ||
Ref ref, | ||
BroadcastRoundId roundId, | ||
BroadcastGameId gameId, | ||
) { | ||
return ref.watch( | ||
broadcastRoundControllerProvider(roundId) | ||
.selectAsync((round) => round.games[gameId]!), | ||
); | ||
} | ||
|
||
@riverpod | ||
Future<String> broadcastGameScreenTitle( | ||
Ref ref, | ||
BroadcastRoundId roundId, | ||
) { | ||
return ref.watch( | ||
broadcastRoundControllerProvider(roundId) | ||
.selectAsync((round) => round.round.name), | ||
); | ||
} |
Oops, something went wrong.
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.
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.
I'd rather have a
SizedBox.shrink()
here than a default title.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.
Done