mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Merge branch 'dulanov-fix-588' into Development
This commit is contained in:
commit
7748fe66a9
1 changed files with 10 additions and 0 deletions
|
@ -93,6 +93,7 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
|
||||||
private int gridRow = 0;
|
private int gridRow = 0;
|
||||||
private Label nrOfOffersLabel;
|
private Label nrOfOffersLabel;
|
||||||
private ListChangeListener<OfferBookListItem> offerListListener;
|
private ListChangeListener<OfferBookListItem> offerListListener;
|
||||||
|
private ChangeListener<Number> priceFeedUpdateCounterListener;
|
||||||
private Subscription currencySelectionSubscriber;
|
private Subscription currencySelectionSubscriber;
|
||||||
|
|
||||||
|
|
||||||
|
@ -211,6 +212,12 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
|
||||||
GridPane.setVgrow(createOfferButton, Priority.NEVER);
|
GridPane.setVgrow(createOfferButton, Priority.NEVER);
|
||||||
GridPane.setValignment(createOfferButton, VPos.TOP);
|
GridPane.setValignment(createOfferButton, VPos.TOP);
|
||||||
offerListListener = c -> nrOfOffersLabel.setText(Res.get("offerbook.nrOffers", model.getOfferList().size()));
|
offerListListener = c -> nrOfOffersLabel.setText(Res.get("offerbook.nrOffers", model.getOfferList().size()));
|
||||||
|
|
||||||
|
// Incorrect ordering of Available offers:
|
||||||
|
// https://github.com/bisq-network/exchange/issues/588
|
||||||
|
priceFeedUpdateCounterListener = (observable, oldValue, newValue) -> {
|
||||||
|
tableView.sort();
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -268,6 +275,8 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
|
||||||
|
|
||||||
model.getOfferList().addListener(offerListListener);
|
model.getOfferList().addListener(offerListListener);
|
||||||
nrOfOffersLabel.setText(Res.get("offerbook.nrOffers", model.getOfferList().size()));
|
nrOfOffersLabel.setText(Res.get("offerbook.nrOffers", model.getOfferList().size()));
|
||||||
|
|
||||||
|
model.priceFeedService.updateCounterProperty().addListener(priceFeedUpdateCounterListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -283,6 +292,7 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
|
||||||
model.getOfferList().comparatorProperty().unbind();
|
model.getOfferList().comparatorProperty().unbind();
|
||||||
|
|
||||||
model.getOfferList().removeListener(offerListListener);
|
model.getOfferList().removeListener(offerListListener);
|
||||||
|
model.priceFeedService.updateCounterProperty().removeListener(priceFeedUpdateCounterListener);
|
||||||
|
|
||||||
currencySelectionSubscriber.unsubscribe();
|
currencySelectionSubscriber.unsubscribe();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue