mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-24 04:53:54 +00:00
Merge branch 'master' into raceboardmodes
This commit is contained in:
commit
8d36f52620
5 files changed
+11
-7
No files matched your search
+1
-1
@@ -1101,7 +1101,7 @@ public abstract class TrackedRaceImpl extends TrackedRaceWithWindEssentials impl
|
||||
if (getEndOfRace() == null) {
|
||||
if (getTimePointOfNewestEvent() != null) {
|
||||
endOfLivePeriod = getTimePointOfNewestEvent().plus(
|
||||
TimingConstants.IS_LIVE_GRACE_PERIOD_IN_MILLIS);
|
||||
TimingConstants.IS_LIVE_GRACE_PERIOD_IN_MILLIS).plus(getDelayToLiveInMillis());
|
||||
} else {
|
||||
endOfLivePeriod = null;
|
||||
}
|
||||
|
||||
+2
-2
@@ -47,8 +47,8 @@ public class RaceListContainer<T extends RaceMetadataDTO<?>> extends Composite i
|
||||
}
|
||||
|
||||
public void setRaceListData(Collection<T> data) {
|
||||
if(data == null || data.isEmpty()) {
|
||||
if(noContentPlaceholderText == null) {
|
||||
if (data == null || data.isEmpty()) {
|
||||
if (noContentPlaceholderText == null) {
|
||||
getElement().getStyle().setDisplay(Display.NONE);
|
||||
} else {
|
||||
noContentPlaceholderUi.setInnerText(noContentPlaceholderText);
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@ public final class EventActionUtil {
|
||||
public static <T extends DTO> ResultWithTTL<T> withLiveRaceOrDefaultSchedule(SailingDispatchContext context, UUID eventId, CalculationWithEvent<T> callback) {
|
||||
Event event = context.getRacingEventService().getEvent(eventId);
|
||||
EventState eventState = HomeServiceUtil.calculateEventState(event);
|
||||
if(eventState != EventState.RUNNING) {
|
||||
if (eventState != EventState.RUNNING) {
|
||||
return new ResultWithTTL<T>(calculateTtlForNonLiveEvent(event, eventState), null);
|
||||
}
|
||||
return callback.calculateWithEvent(event);
|
||||
|
||||
+3
-3
@@ -63,9 +63,9 @@ public class LeaderboardContext {
|
||||
}
|
||||
|
||||
public void forRaces(RaceCallback callback) {
|
||||
for(RaceColumn raceColumn : leaderboard.getRaceColumns()) {
|
||||
if(!raceColumn.isCarryForward()) {
|
||||
for(Fleet fleet : raceColumn.getFleets()) {
|
||||
for (RaceColumn raceColumn : leaderboard.getRaceColumns()) {
|
||||
if (!raceColumn.isCarryForward()) {
|
||||
for (Fleet fleet : raceColumn.getFleets()) {
|
||||
callback.doForRace(new RaceContext(service, event, this, raceColumn, fleet, service));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,10 @@ public class SortedSetResult<T extends DTO> implements CollectionResult<T> {
|
||||
this.values.addAll(values);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the {@code value} to this result if {@code value} is not {@code null}. If an object equal
|
||||
* to {@code value} is already contained in this result, no action is taken.
|
||||
*/
|
||||
public void addValue(T value) {
|
||||
if (value != null) {
|
||||
this.values.add(value);
|
||||
|
||||
Reference in new issue
Block a user