mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 10:22:18 +01:00
Merged
This commit is contained in:
commit
2ae5787a89
@ -723,6 +723,12 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel> extends
|
||||
volumeListener = (observable, oldValue, newValue) -> {
|
||||
if (!newValue.equals("") && CurrencyUtil.isFiatCurrency(model.tradeCurrencyCode.get())) {
|
||||
volumeInfoInputTextField.setContentForPrivacyPopOver(createPopoverLabel(Res.get("offerbook.info.roundedFiatVolume")));
|
||||
if (!volumeTextField.isFocused()) {
|
||||
new Popup<>().headLine(Res.get("popup.roundedFiatValues.headline"))
|
||||
.information(Res.get("popup.roundedFiatValues.msg", model.tradeCurrencyCode.get()))
|
||||
.dontShowAgainId("FiatValuesRoundedWarning")
|
||||
.show();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -685,7 +685,10 @@ public abstract class MutableOfferViewModel<M extends MutableOfferDataModel> ext
|
||||
minAmountValidationResult.set(isBtcInputValid(minAmount.get()));
|
||||
}
|
||||
// We want to trigger a recalculation of the volume
|
||||
UserThread.execute(() -> onFocusOutVolumeTextField(true, false));
|
||||
UserThread.execute(() -> {
|
||||
onFocusOutVolumeTextField(true, false);
|
||||
onFocusOutMinAmountTextField(true, false);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,6 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||
private BusyAnimation waitingForFundsBusyAnimation, offerAvailabilityBusyAnimation;
|
||||
private Notification walletFundedNotification;
|
||||
private OfferView.CloseHandler closeHandler;
|
||||
private ChangeListener<Boolean> amountFocusedListener;
|
||||
private Subscription cancelButton2StyleSubscription, balanceSubscription,
|
||||
showTransactionPublishedScreenSubscription, showWarningInvalidBtcDecimalPlacesSubscription,
|
||||
isWaitingForFundsSubscription, offerWarningSubscription, errorMessageSubscription,
|
||||
@ -154,7 +153,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||
private int gridRow = 0;
|
||||
private boolean offerDetailsWindowDisplayed, clearXchangeWarningDisplayed;
|
||||
private SimpleBooleanProperty errorPopupDisplayed;
|
||||
private ChangeListener<Boolean> getShowWalletFundedNotificationListener;
|
||||
private ChangeListener<Boolean> amountFocusedListener, getShowWalletFundedNotificationListener;
|
||||
private InfoTextField volumeInfoTextField;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -212,8 +211,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||
protected void activate() {
|
||||
addBindings();
|
||||
addSubscriptions();
|
||||
|
||||
amountTextField.focusedProperty().addListener(amountFocusedListener);
|
||||
addListeners();
|
||||
|
||||
if (offerAvailabilityBusyAnimation != null && !model.showPayFundsScreenDisplayed.get()) {
|
||||
offerAvailabilityBusyAnimation.play();
|
||||
@ -253,23 +251,25 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||
showNextStepAfterAmountIsSet();
|
||||
}
|
||||
|
||||
// notifications
|
||||
model.dataModel.getShowWalletFundedNotification().addListener(getShowWalletFundedNotificationListener);
|
||||
if (CurrencyUtil.isFiatCurrency(model.getOffer().getCurrencyCode())) {
|
||||
new Popup<>().headLine(Res.get("popup.roundedFiatValues.headline"))
|
||||
.information(Res.get("popup.roundedFiatValues.msg", model.getOffer().getCurrencyCode()))
|
||||
.dontShowAgainId("FiatValuesRoundedWarning")
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void deactivate() {
|
||||
removeBindings();
|
||||
removeSubscriptions();
|
||||
amountTextField.focusedProperty().removeListener(amountFocusedListener);
|
||||
removeListeners();
|
||||
|
||||
if (offerAvailabilityBusyAnimation != null)
|
||||
offerAvailabilityBusyAnimation.stop();
|
||||
|
||||
if (waitingForFundsBusyAnimation != null)
|
||||
waitingForFundsBusyAnimation.stop();
|
||||
|
||||
model.dataModel.getShowWalletFundedNotification().removeListener(getShowWalletFundedNotificationListener);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -664,6 +664,15 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||
cancelButton2StyleSubscription.unsubscribe();
|
||||
}
|
||||
|
||||
private void addListeners() {
|
||||
amountTextField.focusedProperty().addListener(amountFocusedListener);
|
||||
model.dataModel.getShowWalletFundedNotification().addListener(getShowWalletFundedNotificationListener);
|
||||
}
|
||||
|
||||
private void removeListeners() {
|
||||
amountTextField.focusedProperty().removeListener(amountFocusedListener);
|
||||
model.dataModel.getShowWalletFundedNotification().removeListener(getShowWalletFundedNotificationListener);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Build UI elements
|
||||
|
Loading…
Reference in New Issue
Block a user