Skip to content

Conversation

@tom-anders
Copy link
Collaborator

Fixes #1626.

This regression was introduced in #1135: The _checkEmergency() function was copied from the old CountdownClock widget , for which there always was a separate instance per side. The new ChessClock class tracks the time of both sides, so we now also need to track the shouldPlayEmergencySound (which I renamed to shouldTriggerEmergencyCallback, as the class does not actually play sounds anymore since the refactoring) and nextEmergency fields separately for each side.

Added a regression tests as well.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

Files not reviewed (2)
  • lib/src/model/clock/chess_clock.dart: Language not supported
  • test/model/clock/chess_clock_test.dart: Language not supported

@veloce veloce merged commit 180bb78 into lichess-org:main Apr 21, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Excessive Low Time Audio Alerts

2 participants