Merge pull request #1775 from devinbileck/fix-take-offer-view

Hide text that is not applicable in take offer view
This commit is contained in:
Christoph Atteneder 2018-10-17 10:17:31 +02:00 committed by GitHub
commit 9ce8b215e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -251,7 +251,10 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
maybeShowClearXchangeWarning();
if (!model.isRange()) {
showNextStepAfterAmountIsSet();
nextButton.setVisible(false);
cancelButton1.setVisible(false);
if (model.isOfferAvailable.get())
showNextStepAfterAmountIsSet();
}
if (CurrencyUtil.isFiatCurrency(model.getOffer().getCurrencyCode())) {
@ -408,6 +411,9 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
cancelButton1.setVisible(false);
cancelButton1.setManaged(false);
cancelButton1.setOnAction(null);
offerAvailabilityBusyAnimation.stop();
offerAvailabilityLabel.setVisible(false);
offerAvailabilityLabel.setManaged(false);
model.onShowPayFundsScreen();
@ -445,7 +451,6 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
.show();
}
offerAvailabilityBusyAnimation.stop();
cancelButton2.setVisible(true);
waitingForFundsBusyAnimation.play();
@ -575,8 +580,11 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
});
isOfferAvailableSubscription = EasyBind.subscribe(model.isOfferAvailable, isOfferAvailable -> {
if (isOfferAvailable)
if (isOfferAvailable) {
offerAvailabilityBusyAnimation.stop();
if (!model.isRange() && !model.showPayFundsScreenDisplayed.get())
showNextStepAfterAmountIsSet();
}
offerAvailabilityLabel.setVisible(!isOfferAvailable);
offerAvailabilityLabel.setManaged(!isOfferAvailable);