Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/src/model/game/game_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ class GameController extends _$GameController {

_socketEventVersion = fullEvent.socketEventVersion;

if (game.status == GameStatus.started && game.steps.length == 1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The logic here should be more complicated than that.

One needs to ensure:

  • you are playing this game and not spectating it
  • you have not played a moved yet (so depending on the side, 0 or 1 move was played)

Copy link
Collaborator

Choose a reason for hiding this comment

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

you have not played a moved yet (so depending on the side, 0 or 1 move was played)

Not sure about that one - the web UI also seems to play the sound only if no move has been played at all yet.

ref.read(soundServiceProvider).play(Sound.dong);
}

return GameState(
gameFullId: gameFullId,
game: game,
Expand Down