mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-25 07:27:18 +01:00
Remove chainHeightListeners from PeriodService
- Rename addPeriodStateChangeListener to addChainHeightListener
This commit is contained in:
parent
bf8629d23e
commit
81c57cf2d5
1 changed files with 3 additions and 2 deletions
|
@ -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.
|
// We need to delay as otherwise the periodService has not been updated yet.
|
||||||
UserThread.execute(() -> onChainHeightChanged(daoFacade.getChainHeight()));
|
UserThread.execute(() -> onChainHeightChanged(daoFacade.getChainHeight()));
|
||||||
|
@ -133,10 +133,11 @@ public class ProposalDashboardView extends ActivatableView<GridPane, Void> imple
|
||||||
@Override
|
@Override
|
||||||
protected void deactivate() {
|
protected void deactivate() {
|
||||||
super.deactivate();
|
super.deactivate();
|
||||||
daoFacade.removePeriodStateChangeListener(this);
|
daoFacade.removeChainHeightListener(this);
|
||||||
phaseSubscription.unsubscribe();
|
phaseSubscription.unsubscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ChainHeightListener
|
||||||
@Override
|
@Override
|
||||||
public void onChainHeightChanged(int height) {
|
public void onChainHeightChanged(int height) {
|
||||||
if (height > 0) {
|
if (height > 0) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue