Live-Edit Modus #207
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user