mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-08 21:30:57 +00:00
Live races ui - Fixed race progress if no leg is started
This commit is contained in:
1 parent
8098cdbcaa
commit
e7b6d4c911
1 file changed
+3
-1
+3
-1
@@ -191,7 +191,9 @@ public class RaceContext {
|
||||
if(raceDefinition != null && raceDefinition.getCourse() != null && trackedRace != null) {
|
||||
int totalLegsCount = raceDefinition.getCourse().getLegs().size();
|
||||
int currentLegNo = trackedRace.getLastLegStarted(MillisecondsTimePoint.now());
|
||||
raceProgress = new RaceProgressDTO(currentLegNo, totalLegsCount);
|
||||
if (currentLegNo > 0 && totalLegsCount > 0) {
|
||||
raceProgress = new RaceProgressDTO(currentLegNo, totalLegsCount);
|
||||
}
|
||||
}
|
||||
return raceProgress;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user