From 0d9e88039de80265876e0c6d1386772177d9f3ed Mon Sep 17 00:00:00 2001 From: Johannes Brandenburger <79154528+johannesbrandenburger@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:55:00 +0100 Subject: [PATCH] quickfix: scoreboard state --- .../lib/components/general/quiz/QuizScoreboard.dart | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/frontend/lib/components/general/quiz/QuizScoreboard.dart b/frontend/lib/components/general/quiz/QuizScoreboard.dart index 04aa1422..c49bdfbd 100644 --- a/frontend/lib/components/general/quiz/QuizScoreboard.dart +++ b/frontend/lib/components/general/quiz/QuizScoreboard.dart @@ -21,6 +21,16 @@ class _QuizScoreboardState extends State { _scoreboard = widget.scoreboard; } + @override + void didUpdateWidget(QuizScoreboard oldWidget) { + super.didUpdateWidget(oldWidget); + if (oldWidget.scoreboard != widget.scoreboard) { + setState(() { + _scoreboard = widget.scoreboard; + }); + } + } + @override Widget build(BuildContext context) { final colors = Theme.of(context).colorScheme;