use of bisq.desktop.main.overlays.popups.Popup in project bisq-desktop by bisq-network.
the class BuyerStep2View method showConfirmPaymentStartedPopup.
@SuppressWarnings("PointlessBooleanExpression")
private void showConfirmPaymentStartedPopup() {
// noinspection UnusedAssignment
String key = "confirmPaymentStarted";
// noinspection ConstantConditions
if (!DevEnv.isDevMode() && DontShowAgainLookup.showAgain(key)) {
Popup popup = new Popup<>();
popup.headLine(Res.get("portfolio.pending.step2_buyer.confirmStart.headline")).confirmation(Res.get("portfolio.pending.step2_buyer.confirmStart.msg", CurrencyUtil.getNameByCode(trade.getOffer().getCurrencyCode()))).width(700).actionButtonText(Res.get("portfolio.pending.step2_buyer.confirmStart.yes")).onAction(this::confirmPaymentStarted).closeButtonText(Res.get("shared.no")).onClose(popup::hide).dontShowAgainId(key).show();
} else {
confirmPaymentStarted();
}
}
use of bisq.desktop.main.overlays.popups.Popup in project bisq-desktop by bisq-network.
the class BuyerStep2View method onPaymentStarted.
// /////////////////////////////////////////////////////////////////////////////////////////
// UI Handlers
// /////////////////////////////////////////////////////////////////////////////////////////
@SuppressWarnings("PointlessBooleanExpression")
private void onPaymentStarted() {
if (model.p2PService.isBootstrapped()) {
if (model.dataModel.getSellersPaymentAccountPayload() instanceof CashDepositAccountPayload) {
// noinspection UnusedAssignment
String key = "confirmPaperReceiptSent";
// noinspection ConstantConditions
if (!DevEnv.isDevMode() && DontShowAgainLookup.showAgain(key)) {
Popup popup = new Popup<>();
popup.headLine(Res.get("portfolio.pending.step2_buyer.paperReceipt.headline")).feedback(Res.get("portfolio.pending.step2_buyer.paperReceipt.msg")).onAction(this::showConfirmPaymentStartedPopup).closeButtonText(Res.get("shared.no")).onClose(popup::hide).dontShowAgainId(key).show();
} else {
showConfirmPaymentStartedPopup();
}
} else if (model.dataModel.getSellersPaymentAccountPayload() instanceof WesternUnionAccountPayload) {
// noinspection UnusedAssignment
// noinspection ConstantConditions
String key = "westernUnionMTCNSent";
if (!DevEnv.isDevMode() && DontShowAgainLookup.showAgain(key)) {
String email = ((WesternUnionAccountPayload) model.dataModel.getSellersPaymentAccountPayload()).getEmail();
Popup popup = new Popup<>();
popup.headLine(Res.get("portfolio.pending.step2_buyer.westernUnionMTCNInfo.headline")).feedback(Res.get("portfolio.pending.step2_buyer.westernUnionMTCNInfo.msg", email)).onAction(this::showConfirmPaymentStartedPopup).actionButtonText(Res.get("shared.yes")).closeButtonText(Res.get("shared.no")).onClose(popup::hide).dontShowAgainId(key).show();
} else {
showConfirmPaymentStartedPopup();
}
} else {
showConfirmPaymentStartedPopup();
}
} else {
new Popup<>().information(Res.get("popup.warning.notFullyConnected")).show();
}
}
Aggregations