fix: score update
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 43s
Pull Request Pipeline / lint (pull_request) Successful in 59s

This commit is contained in:
2026-05-05 22:45:57 +02:00
parent ec4d6ce5ec
commit 5bac5f1c38

View File

@@ -205,7 +205,9 @@ class _MatchDetailViewState extends State<MatchDetailView> {
match: match,
onWinnerChanged: () {
widget.onMatchUpdate.call();
setState(() {});
setState(() {
updateScoresForCurrentMatch();
});
},
),
),
@@ -333,4 +335,10 @@ class _MatchDetailViewState extends State<MatchDetailView> {
return match.game.ruleset == Ruleset.singleWinner ||
match.game.ruleset == Ruleset.singleLoser;
}
void updateScoresForCurrentMatch() {
db.scoreEntryDao
.getAllMatchScores(matchId: match.id)
.then((scores) => match.scores = scores);
}
}