proposed fix for bug2805

This commit is contained in:
Axel Uhl committed 2015-05-01 22:54:05 +02:00
1 parent c86f1b8f1b
commit cd19b87535
2 files changed
+11 -7

No files matched your search

@@ -26,20 +26,20 @@ public class EventRegattaActivity extends AbstractEventActivity<AbstractEventReg
private final UserAgentDetails userAgent = new UserAgentDetails(Window.Navigator.getUserAgent());
private final AsyncActionsExecutor asyncActionsExecutor = new AsyncActionsExecutor();
private final long delayBetweenAutoAdvancesInMilliseconds = 3000l;
private final Timer autoRefreshTimer = new Timer(PlayModes.Live, PlayStates.Paused,
delayBetweenAutoAdvancesInMilliseconds);
private final Timer autoRefreshTimer;
public EventRegattaActivity(AbstractEventRegattaPlace place, EventClientFactory clientFactory,
HomePlacesNavigator homePlacesNavigator) {
super(place, clientFactory, homePlacesNavigator);
if (this.ctx.getRegattaAnalyticsManager() == null) {
ctx.withRegattaAnalyticsManager(new RegattaAnalyticsDataManager( //
clientFactory.getSailingService(), //
asyncActionsExecutor, //
autoRefreshTimer, //
clientFactory.getErrorReporter(), //
ctx.withRegattaAnalyticsManager(new RegattaAnalyticsDataManager(
clientFactory.getSailingService(),
asyncActionsExecutor,
new Timer(PlayModes.Live, PlayStates.Paused, delayBetweenAutoAdvancesInMilliseconds),
clientFactory.getErrorReporter(),
userAgent));
}
this.autoRefreshTimer = ctx.getRegattaAnalyticsManager().getTimer();
}
@Override
@@ -134,4 +134,8 @@ public class RegattaAnalyticsDataManager {
dialog.ensureDebugId(debugIdPrefix + "SettingsDialog");
dialog.show();
}
public Timer getTimer() {
return timer;
}
}