Refactor page routing and point calculation logic

Streamlined the `page` routing structure by optimizing branch and file handling, introducing a reusable `filesInDirectory` method, and cleaning up redundancies. Enhanced `EventGroup` point calculation with incremental updates, new helper methods (`getTeams`, `getTeamsId`), and better handling of unfinished fights.
This commit is contained in:
2025-05-28 23:57:29 +02:00
parent 8768fd7d81
commit a5bb62590c
3 changed files with 130 additions and 105 deletions
@@ -40,7 +40,8 @@ data class ResponseEventFight(
val start: Long,
val ergebnis: Int,
val spectatePort: Int?,
val group: ResponseGroups?
val group: ResponseGroups?,
val hasFinished: Boolean
) {
constructor(eventFight: EventFight) : this(
eventFight.fightID,
@@ -51,7 +52,8 @@ data class ResponseEventFight(
eventFight.startTime.time,
eventFight.ergebnis,
eventFight.spectatePort,
eventFight.group.orElse(null)?.let { ResponseGroups(it) }
eventFight.group.orElse(null)?.let { ResponseGroups(it, short = true) },
eventFight.hasFinished()
)
}