some small tweaks
This commit is contained in:
parent
72a6f30227
commit
012b20b09f
2 changed files with 10 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ class GameRoundModel {
|
|||
required this.timer,
|
||||
}) {
|
||||
createdAt = DateTime.now();
|
||||
debugPrint("timeline: ${controller.room.timeline}");
|
||||
syncSubscription ??= client.onSync.stream.listen((update) {
|
||||
final newMessages = update.messages(controller.room);
|
||||
final botMessages = newMessages
|
||||
|
|
@ -43,6 +44,7 @@ class GameRoundModel {
|
|||
startRound();
|
||||
} else if (state == RoundState.inProgress) {
|
||||
endRound();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,6 +74,14 @@ class RoundTimerState extends State<RoundTimer> {
|
|||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
if (_timer != null) {
|
||||
_timer!.cancel();
|
||||
}
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Material(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue