cleanup bugfix for bug4494

This commit is contained in:
Kai Boernert committed 2018-03-28 10:27:39 +02:00
1 parent 6301647def
commit 2df24729bd
3 files changed
+9 -14

No files matched your search

@@ -25,6 +25,7 @@ import com.sap.sse.gwt.client.event.LocaleChangeEvent;
import com.sap.sse.gwt.client.event.LocaleChangeEventHandler;
import com.sap.sse.gwt.client.shared.perspective.PerspectiveCompositeSettings;
import com.sap.sse.gwt.settings.SettingsToUrlSerializer;
import com.sap.sse.security.ui.client.UserService;
public class AutoPlayStartPresenterImpl extends AbstractActivity implements AutoPlayStartView.Presenter {
public static final String LOAD_EVENTS_DATA_CATEGORY = "loadEventsData";
@@ -37,7 +38,6 @@ public class AutoPlayStartPresenterImpl extends AbstractActivity implements Auto
AutoPlayStartView view) {
this.clientFactory = clientFactory;
this.view = view;
view.setUserService(this.clientFactory.getUserService());
}
@Override
@@ -119,4 +119,9 @@ public class AutoPlayStartPresenterImpl extends AbstractActivity implements Auto
AutoPlayConfiguration autoPlayConfiguration = ctxDef.getType().getConfig();
autoPlayConfiguration.startRootNode(clientFactory, ctxDef, settings);
}
@Override
public UserService getUserService() {
return clientFactory.getUserService();
}
}
@@ -12,14 +12,12 @@ public interface AutoPlayStartView {
public interface Presenter {
void startRootNode(AutoPlayContextDefinition ctxDef,
PerspectiveCompositeSettings<?> settings);
void handleLocaleChange(String selectedLocale);
UserService getUserService();
}
void setCurrentPresenter(Presenter currentPresenter);
Widget asWidget();
void setEvents(List<EventDTO> events);
void showLoading();
void setUserService(UserService userService);
}
@@ -32,7 +32,6 @@ import com.sap.sse.gwt.client.GWTLocaleUtil;
import com.sap.sse.gwt.client.shared.perspective.PerspectiveCompositeSettings;
import com.sap.sse.gwt.settings.SettingsToUrlSerializer;
import com.sap.sse.gwt.settings.UrlBuilderUtil;
import com.sap.sse.security.ui.client.UserService;
public class AutoPlayStartViewImpl extends Composite implements AutoPlayStartView {
private static StartPageViewUiBinder uiBinder = GWT.create(StartPageViewUiBinder.class);
@@ -66,7 +65,6 @@ public class AutoPlayStartViewImpl extends Composite implements AutoPlayStartVie
private AutoPlayContextDefinitionImpl apcd;
private PerspectiveCompositeSettings<?> settings;
private String configuratedUrl;
private UserService userService;
public AutoPlayStartViewImpl() {
super();
@@ -153,7 +151,7 @@ public class AutoPlayStartViewImpl extends Composite implements AutoPlayStartVie
settings = newSettings;
updateURL();
}
}, settings, apcd, userService);
}, settings, apcd, currentPresenter.getUserService());
}
private boolean validate() {
@@ -192,7 +190,7 @@ public class AutoPlayStartViewImpl extends Composite implements AutoPlayStartVie
settingsButton.removeStyleName(SharedResources.INSTANCE.mainCss().buttoninactive());
startAutoPlayButton.removeStyleName(SharedResources.INSTANCE.mainCss().buttoninactive());
apcd = new AutoPlayContextDefinitionImpl(selectedAutoPlayType, selectedEvent.id, selectedLeaderboardName);
apcd.getType().getConfig().loadSettingsDefault(selectedEvent, selectedLeaderboard, userService,
apcd.getType().getConfig().loadSettingsDefault(selectedEvent, selectedLeaderboard, currentPresenter.getUserService(),
new OnSettingsCallback() {
@Override
public void newSettings(PerspectiveCompositeSettings<?> newSettings) {
@@ -286,10 +284,4 @@ public class AutoPlayStartViewImpl extends Composite implements AutoPlayStartVie
public void showLoading() {
startAutoPlayButton.setEnabled(false);
}
@Override
public void setUserService(UserService userService) {
this.userService = userService;
}
}