Skip to content

Commit

Permalink
Add missing Bsq state listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
ripcurlx committed Apr 4, 2019
1 parent 77df0f9 commit f2eabbc
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ protected void activate() {

selectedProposalSubscription = EasyBind.subscribe(tableView.getSelectionModel().selectedItemProperty(), this::onSelectProposal);

daoFacade.addBsqStateListener(this);

sortedList.comparatorProperty().bind(tableView.comparatorProperty());
tableView.setPrefHeight(100);
root.getScene().heightProperty().addListener(sceneHeightListener);
Expand Down Expand Up @@ -304,7 +306,7 @@ public void onParseBlockChainComplete() {
private void addListenersAfterParseBlockChainComplete() {
daoFacade.getActiveOrMyUnconfirmedProposals().addListener(proposalListChangeListener);
daoFacade.getAllBallots().addListener(ballotListChangeListener);
daoFacade.addBsqStateListener(this);

bsqWalletService.addBsqBalanceListener(this);

phaseSubscription = EasyBind.subscribe(daoFacade.phaseProperty(), this::onPhaseChanged);
Expand All @@ -314,10 +316,6 @@ private void updateListItems() {
listItems.forEach(ProposalsListItem::cleanup);
listItems.clear();

fillListItems();
}

private void fillListItems() {
if (daoFacade.phaseProperty().get().ordinal() < DaoPhase.Phase.BLIND_VOTE.ordinal()) {
// proposal phase
List<Proposal> list = daoFacade.getActiveOrMyUnconfirmedProposals();
Expand Down

0 comments on commit f2eabbc

Please sign in to comment.