Fix hub diretta: considera solo l'ultima sessione, non idle orfane.
Dopo «Termina trasmissione» la partita restava visibile se esisteva una vecchia sessione idle precedente a quella ended; l'hub e l'app usano ora lo stato dell'ultima sessione. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -140,7 +140,10 @@ fun MatchesScreen(
|
||||
|
||||
val pullRefreshState = rememberPullToRefreshState()
|
||||
|
||||
val activeMatch = matches.firstOrNull { it.canResumeCamera || it.hasActiveSession }
|
||||
val activeMatch = matches.firstOrNull { match ->
|
||||
match.canResumeCamera ||
|
||||
(match.hasActiveSession && match.activeSessionStatus == "idle")
|
||||
}
|
||||
val scheduledMatches = matches.filter { match ->
|
||||
!match.hasActiveSession && parseApiInstant(match.scheduledAt)?.isScheduledFuture() == true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user