Fixed broken classes - related to teaser image usage on mobile devices

This commit is contained in:
Benjamin Barth committed 2015-09-07 15:22:44 +02:00
1 parent e14c242695
commit 91625fe121
2 files changed
+11 -2

No files matched your search

@@ -29,7 +29,7 @@ public class StartActivity extends AbstractActivity implements Presenter {
public void start(final AcceptsOneWidget panel, EventBus eventBus) {
Window.setTitle(place.getTitle());
final StartView view = new StartViewImpl(StartActivity.this);
clientFactory.getDispatch().execute(new GetStagedEventsAction(), new AsyncCallback<ListResult<EventStageDTO>>() {
clientFactory.getDispatch().execute(new GetStagedEventsAction(true), new AsyncCallback<ListResult<EventStageDTO>>() {
@Override
public void onFailure(Throwable caught) {
// TODO Auto-generated method stub
@@ -16,6 +16,15 @@ import com.sap.sse.common.Util.Pair;
public class GetStagedEventsAction implements Action<ListResult<EventStageDTO>> {
private boolean useTeaserImage;
protected GetStagedEventsAction() {
}
public GetStagedEventsAction(boolean useTeaserImage) {
this.useTeaserImage = useTeaserImage;
}
@GwtIncompatible
public ListResult<EventStageDTO> execute(final DispatchContext context) throws MalformedURLException {
EventStageCandidateCalculator stageCandidateCalculator = new EventStageCandidateCalculator();
@@ -29,7 +38,7 @@ public class GetStagedEventsAction implements Action<ListResult<EventStageDTO>>
}
StageEventType stageType = pair.getA();
EventHolder holder = pair.getB();
result.addValue(HomeServiceUtil.convertToEventStageDTO(holder.event, holder.baseURL, holder.onRemoteServer, stageType, context.getRacingEventService()));
result.addValue(HomeServiceUtil.convertToEventStageDTO(holder.event, holder.baseURL, holder.onRemoteServer, stageType, context.getRacingEventService(), useTeaserImage));
}
return result;
}