mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-27 14:27:15 +00:00
GetRaceListViewAction is now called with a regattaId to make it work
with multi regatta events and series events
This commit is contained in:
1 parent
cf96b88a9c
commit
6dcff55345
2 files changed
+4
-3
No files matched your search
+1
-1
@@ -98,7 +98,7 @@ public class RegattaRacesTabView extends Composite implements RegattaTabView<Reg
|
||||
listNavigationPanelUi.addAction(Navigation.SORT_LIST_FORMAT, true);
|
||||
// listNavigationPanelUi.addAction(Navigation.COMPETITION_FORMAT, false);
|
||||
|
||||
GetRaceListViewAction action = new GetRaceListViewAction(myPlace.getCtx().getEventDTO().getId());
|
||||
GetRaceListViewAction action = new GetRaceListViewAction(myPlace.getCtx().getEventDTO().getId(), myPlace.getRegattaId());
|
||||
currentPresenter.getDispatch().execute(action, new AsyncCallback<ResultWithTTL<RaceListViewDTO>>() {
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
|
||||
+3
-2
@@ -14,11 +14,12 @@ public class GetRaceListViewAction implements Action<ResultWithTTL<RaceListViewD
|
||||
private static final Logger logger = Logger.getLogger(GetRaceListViewAction.class.getName());
|
||||
|
||||
private UUID eventId;
|
||||
private String regattaId;
|
||||
|
||||
public GetRaceListViewAction() {
|
||||
}
|
||||
|
||||
public GetRaceListViewAction(UUID eventId) {
|
||||
public GetRaceListViewAction(UUID eventId, String regattaId) {
|
||||
this.eventId = eventId;
|
||||
}
|
||||
|
||||
@@ -27,7 +28,7 @@ public class GetRaceListViewAction implements Action<ResultWithTTL<RaceListViewD
|
||||
public ResultWithTTL<RaceListViewDTO> execute(DispatchContext context) {
|
||||
long start = System.currentTimeMillis();
|
||||
RaceListDataCalculator raceListDataCalculator = new RaceListDataCalculator();
|
||||
EventActionUtil.forRacesOfEvent(context, eventId, raceListDataCalculator);
|
||||
EventActionUtil.forRacesOfRegatta(context, eventId, regattaId, raceListDataCalculator);
|
||||
ResultWithTTL<RaceListViewDTO> result = raceListDataCalculator.getResult();
|
||||
|
||||
long duration = System.currentTimeMillis() - start;
|
||||
|
||||
Reference in new issue
Block a user