Skip to content

Commit

Permalink
fix unstable test、mild fix log level (#85)
Browse files Browse the repository at this point in the history
* fix unstable test

* mild fix log level

* add release description by job
  • Loading branch information
sensuikan1973 authored Mar 20, 2021
1 parent add7575 commit c2ae9d7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,6 @@ jobs:
draft: true
tag_name: ${{ github.event.inputs.tag }}
files: ${{ env.PUBLISH_DIR }}/pedax-${{ runner.os }}.zip
# See: https://docs.github.com/ja/actions/reference/environment-variables
body: |-
This release is created by $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID.
4 changes: 2 additions & 2 deletions lib/engine/edax_server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class EdaxServer {

// ignore: avoid_annotating_with_dynamic
_receivePort.listen((dynamic message) async {
logger.i('received request "${message.runtimeType}"');
logger.d('received request "${message.runtimeType}"');
if (message is MoveRequest) {
parentSendPort.send(executeMove(edax, message));
} else if (message is PlayRequest) {
Expand All @@ -83,7 +83,7 @@ class EdaxServer {
continue;
}
if (_latestHintMessage.movesAtRequest != message.movesAtRequest) {
logger.i(
logger.d(
'The HintOneByOneRequest (moves: ${message.movesAtRequest}) has dropped.\nIt is because a new HintOneByOneRequest (moves: ${_latestHintMessage.movesAtRequest}) has been received after that.');
break;
}
Expand Down
2 changes: 2 additions & 0 deletions lib/home/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ class _HomeState extends State<Home> {
context.read<BoardNotifier>().finishedNotifyingBookHasLoadedToUser();
WidgetsBinding.instance?.addPostFrameCallback((_) async {
await Future<void>.delayed(const Duration(seconds: 1));
if (!mounted) return;
ScaffoldMessenger.of(context).removeCurrentSnackBar();
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
Expand All @@ -173,6 +174,7 @@ class _HomeState extends State<Home> {
void _showSnackBarOfBookLoading() {
context.read<BoardNotifier>().finishedNotifyingBookHasLoadedToUser();
WidgetsBinding.instance?.addPostFrameCallback((_) {
if (!mounted) return;
ScaffoldMessenger.of(context).removeCurrentSnackBar();
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
Expand Down
2 changes: 1 addition & 1 deletion lib/models/board_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class BoardNotifier extends ValueNotifier<BoardState> {

// ignore: avoid_annotating_with_dynamic
Future<void> _updateStateByEdaxServerResponse(dynamic message) async {
_logger.i('received response "${message.runtimeType}"');
_logger.d('received response "${message.runtimeType}"');
if (message is MoveResponse) {
if (value.currentMoves != message.moves) _requestLatestHintList(message.moves);
value
Expand Down

0 comments on commit c2ae9d7

Please sign in to comment.