Merge branch 'master' into bug2825

This commit is contained in:
Axel Uhl
2016-06-15 01:51:04 +02:00
13 changed files with 109 additions and 27 deletions
@@ -38,6 +38,8 @@ public class GetRegattaListViewAction implements SailingAction<ResultWithTTL<Sor
result.add(leaderboardContext.getRegattaWithProgress());
}
});
// The following will reduce multiple occurrences of the same regatta, e.g., in different leaderboard groups,
// to one occurrence only, randomly picked, by means of the Comparable property of RegattaWithProgressDTO.
return new ResultWithTTL<>(EventActionUtil.getEventStateDependentTTL(context, eventId,
Duration.ONE_MINUTE.times(3)), new SortedSetResult<>(result));
}
@@ -32,7 +32,7 @@ public class RegattaReferenceDTO implements DTO, Comparable<RegattaReferenceDTO>
@Override
public int compareTo(RegattaReferenceDTO o) {
int compareByDisplayName = displayName.compareTo(o.displayName);
if(compareByDisplayName != 0) {
if (compareByDisplayName != 0) {
return compareByDisplayName;
}
return id.compareTo(o.id);
@@ -24,7 +24,7 @@ public class RegattaWithProgressDTO extends RegattaMetadataDTO {
@Override
public int compareTo(RegattaReferenceDTO o) {
if(o instanceof RegattaWithProgressDTO) {
if (o instanceof RegattaWithProgressDTO) {
RegattaWithProgressDTO other = (RegattaWithProgressDTO) o;
RegattaState state = getState();
RegattaState otherState = other.getState();
@@ -51,7 +51,7 @@ public class MultiRegattaList extends Composite implements RefreshableWidget<Sor
for (RegattaWithProgressDTO regattaWithProgress : data) {
regattasContainerUi.add(new MultiRegattaListItem(regattaWithProgress, currentPresenter));
String boatCategory = regattaWithProgress.getBoatCategory();
if(boatCategory != null) {
if (boatCategory != null) {
selectableBoatCategories.add(boatCategory);
}
}
@@ -217,13 +217,13 @@ public class LeaderboardContext {
public void fillRegattaFields(RegattaMetadataDTO regattaDTO) {
regattaDTO.setId(getLeaderboardName());
regattaDTO.setDisplayName(leaderboard.getDisplayName() != null ? leaderboard.getDisplayName() : leaderboard.getName());
if(hasMultipleLeaderboardGroups(event)) {
if (hasMultipleLeaderboardGroups(event)) {
regattaDTO.setBoatCategory(leaderboardGroup.getDisplayName() != null ? leaderboardGroup.getDisplayName() : leaderboardGroup.getName());
}
regattaDTO.setCompetitorsCount(HomeServiceUtil.calculateCompetitorsCount(leaderboard));
regattaDTO.setRaceCount(HomeServiceUtil.calculateRaceCount(leaderboard));
regattaDTO.setBoatClass(HomeServiceUtil.getBoatClassName(leaderboard));
if(leaderboard instanceof RegattaLeaderboard) {
if (leaderboard instanceof RegattaLeaderboard) {
regattaDTO.setStartDate(getStartDateWithEventFallback());
regattaDTO.setEndDate(getEndDateWithEventFallback());
}
@@ -10,6 +10,13 @@
<li>The start time editing screen has now a "Sync to minute" button, which replaces
the both buttons beside the countdown. This button sets the countdown to the nearest
minute and after "Set time" the new start time will be sent to the server.</li>
<li>The "Set Time" button in the start time editing screen remains disabled now until
the user actually makes a change. This also helps to identify that "Set Time"
needs to be tapped in order to transmit a change carried out using the
"Sync to minute" button.</li>
<li>Changing the server, signing out, changing hidden event visibility,
and changing the regatta now properly ensures that the
content is refreshed based on the new settings.</li>
</ul>
<h5 class="articleSubheadline">May 2016</h5>