Updated score dao + tests

This commit is contained in:
2026-04-24 16:36:27 +02:00
parent 92577e4ed9
commit 99b894c580
3 changed files with 215 additions and 239 deletions

View File

@@ -242,9 +242,9 @@ class _MatchResultViewState extends State<MatchResultView> {
/// Handles saving or removing the loser in the database.
Future<bool> _handleLoser() async {
if (_selectedPlayer == null) {
return await db.scoreEntryDao.removeLooser(matchId: widget.match.id);
return await db.scoreEntryDao.removeLoser(matchId: widget.match.id);
} else {
return await db.scoreEntryDao.setLooser(
return await db.scoreEntryDao.setLoser(
matchId: widget.match.id,
playerId: _selectedPlayer!.id,
);