mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-27 14:27:15 +00:00
Races lists - Temporary adjustements to RaceView action and DTO
This commit is contained in:
1 parent
d74245df75
commit
49c7660a5d
2 files changed
+11
-6
No files matched your search
+2
-6
@@ -101,12 +101,8 @@ public class RegattaRacesTabView extends Composite implements RegattaTabView<Reg
|
||||
}
|
||||
@Override
|
||||
public void onSuccess(ResultWithTTL<RaceListViewDTO> result) {
|
||||
LiveRacesDTO dummy = new LiveRacesDTO();
|
||||
dummy.addRace(result.getDto().getLiveRaces().getRaces().get(0));
|
||||
dummy.addRace(result.getDto().getLiveRaces().getRaces().get(1));
|
||||
dummy.addRace(result.getDto().getLiveRaces().getRaces().get(2));
|
||||
liveRacesList.setData(dummy, 0, 0);
|
||||
finishedRacesList.setListData(result.getDto().getLiveRaces());
|
||||
liveRacesList.setData(result.getDto().getLiveRaces(), 0, 0);
|
||||
finishedRacesList.setListData(result.getDto().getAllRaces());
|
||||
contentArea.setWidget(RegattaRacesTabView.this);
|
||||
}
|
||||
});
|
||||
|
||||
+9
@@ -20,6 +20,15 @@ public class RaceListViewDTO implements DTO {
|
||||
}
|
||||
|
||||
public LiveRacesDTO getLiveRaces() {
|
||||
LiveRacesDTO liveRaces = new LiveRacesDTO();
|
||||
for (int i = 0; i < this.liveRaces.getRaces().size(); i++) {
|
||||
if (i == 3) break;
|
||||
liveRaces.addRace(this.liveRaces.getRaces().get(i));
|
||||
}
|
||||
return liveRaces ;
|
||||
}
|
||||
|
||||
public LiveRacesDTO getAllRaces() {
|
||||
return liveRaces;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user