fix: score update
This commit is contained in:
@@ -205,7 +205,9 @@ class _MatchDetailViewState extends State<MatchDetailView> {
|
|||||||
match: match,
|
match: match,
|
||||||
onWinnerChanged: () {
|
onWinnerChanged: () {
|
||||||
widget.onMatchUpdate.call();
|
widget.onMatchUpdate.call();
|
||||||
setState(() {});
|
setState(() {
|
||||||
|
updateScoresForCurrentMatch();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -333,4 +335,10 @@ class _MatchDetailViewState extends State<MatchDetailView> {
|
|||||||
return match.game.ruleset == Ruleset.singleWinner ||
|
return match.game.ruleset == Ruleset.singleWinner ||
|
||||||
match.game.ruleset == Ruleset.singleLoser;
|
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