some small tweaks

This commit is contained in:
ggurdin 2024-08-12 17:24:53 -04:00
parent 72a6f30227
commit 012b20b09f
No known key found for this signature in database
GPG key ID: A01CB41737CBB478
2 changed files with 10 additions and 0 deletions

View file

@ -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;
}
}

View file

@ -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(