Skip to content

Comments

Made it so that Wakelock disables when a game ends - DC#2275

Merged
veloce merged 3 commits intolichess-org:mainfrom
ChopinDavid:Issue2271
Nov 11, 2025
Merged

Made it so that Wakelock disables when a game ends - DC#2275
veloce merged 3 commits intolichess-org:mainfrom
ChopinDavid:Issue2271

Conversation

@ChopinDavid
Copy link
Contributor

This would close #2271.

Please, let me know if there are other places I should have added this and I'll be sure to make updates.

debugPrint('SEVERE: [GameBody] could not load game data; $e\n$s');
return const LoadGameError('Sorry, we could not load the game. Please try again later.');
case AsyncData(value: final gameState, isRefreshing: false):
if (gameState.game.status != GameStatus.created &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be better in the _stateListener I think, instead of making a side effect in the build method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done 👍

});
});

group('Wakelock', () {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 thanks for the tests

@ChopinDavid
Copy link
Contributor Author

@veloce went ahead and made that change and rebased upstream/main. Thanks!

Copy link
Contributor

@veloce veloce left a comment

Choose a reason for hiding this comment

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

lgtm

@veloce veloce merged commit df7b7c3 into lichess-org:main Nov 11, 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.

Suggestion: don't keep the screen on if the game is over (wake lock)

2 participants