Add listeners at init

Remove duplicated listener registration

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
This commit is contained in:
HenrikJannsen 2023-01-05 22:02:57 -05:00
parent bc91914cb0
commit aa514b37da
No known key found for this signature in database
GPG Key ID: 02AA2BAE387C8307

View File

@ -69,9 +69,6 @@ public class DaoPresentation implements DaoStateListener, DaoStateMonitoringServ
}
});
daoStateService.addDaoStateListener(this);
daoStateMonitoringService.addListener(this);
walletChainHeightListener = (observable, oldValue, newValue) -> onUpdateAnyChainHeight();
}
@ -84,6 +81,7 @@ public class DaoPresentation implements DaoStateListener, DaoStateMonitoringServ
btcWalletService.getChainHeightProperty().addListener(walletChainHeightListener);
daoStateService.addDaoStateListener(this);
daoStateMonitoringService.addListener(this);
onUpdateAnyChainHeight();
}