Fix punteggio broadcast iOS: decodifica score e aggiornamento UI.

ScoreStateDto non leggeva home_points con convertFromSnakeCase; ScoreController assegna sempre lo stato, aggiornamento ottimistico e refresh overlay.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Emiliano Frascaro
2026-06-15 07:37:27 +02:00
parent 80813b390b
commit 594853ed04
10 changed files with 364 additions and 286 deletions

View File

@@ -105,7 +105,7 @@ final class MatchScoringRulesTests: XCTestCase {
"data": { "home_score": 42, "away_score": 38, "period": 3, "overtime": false }
}
""".data(using: .utf8)!
let dto = try JSONDecoder().decode(ScoreStateDto.self, from: json)
let dto = try ApiInstant.decoder.decode(ScoreStateDto.self, from: json)
let score = dto.toDomain()
XCTAssertEqual(score.boardType, "basket")
XCTAssertEqual(score.homePoints, 42)