Live-Edit Modus #207

Merged
sneeex merged 20 commits from feature/202-live-edit-modus into development 2026-05-09 17:58:38 +00:00
Showing only changes of commit 5bac5f1c38 - Show all commits

View File

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