Remove chainHeightListeners from PeriodService

- Rename addPeriodStateChangeListener to addChainHeightListener
This commit is contained in:
Manfred Karrer 2018-04-24 09:28:19 -05:00
parent bf8629d23e
commit 81c57cf2d5
No known key found for this signature in database
GPG key ID: 401250966A6B2C46

View file

@ -124,7 +124,7 @@ public class ProposalDashboardView extends ActivatableView<GridPane, Void> imple
});
});
daoFacade.addPeriodStateChangeListener(this);
daoFacade.addChainHeightListener(this);
// We need to delay as otherwise the periodService has not been updated yet.
UserThread.execute(() -> onChainHeightChanged(daoFacade.getChainHeight()));
@ -133,10 +133,11 @@ public class ProposalDashboardView extends ActivatableView<GridPane, Void> imple
@Override
protected void deactivate() {
super.deactivate();
daoFacade.removePeriodStateChangeListener(this);
daoFacade.removeChainHeightListener(this);
phaseSubscription.unsubscribe();
}
// ChainHeightListener
@Override
public void onChainHeightChanged(int height) {
if (height > 0) {