fix: name count 3 player issue

This commit is contained in:
2026-05-22 20:00:28 +02:00
parent 25bc213769
commit 4dcd4f0f71
2 changed files with 55 additions and 2 deletions

View File

@@ -195,7 +195,7 @@ class PlayerDao extends DatabaseAccessor<AppDatabase> with _$PlayerDaoMixin {
if (previousNameCount > 1) {
// Multiple players
final nameCount = await getNameCount(name: previousPlayerName);
await updateNameCount(playerId: player!.id, nameCount: nameCount - 1);
await updateNameCount(playerId: player!.id, nameCount: nameCount);
} else {
// Only one player
await updateNameCount(playerId: player!.id, nameCount: 0);