mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-02 03:36:24 -04:00
set payment sent message state after sending message
This commit is contained in:
parent
fabec9d396
commit
c908294250
4 changed files with 26 additions and 18 deletions
|
@ -194,18 +194,6 @@ public class PendingTradesViewModel extends ActivatableWithDataModel<PendingTrad
|
|||
}
|
||||
}
|
||||
|
||||
public void setMessageStatePropertyIfNotAcked(MessageState messageState) {
|
||||
|
||||
// skip if already acked
|
||||
if (messageStateProperty.get() == MessageState.ACKNOWLEDGED) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (trade != null) {
|
||||
trade.getProcessModel().setPaymentSentMessageState(messageState);
|
||||
}
|
||||
}
|
||||
|
||||
private void onMessageStateChanged(MessageState messageState) {
|
||||
messageStateProperty.set(messageState);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@ import haveno.common.UserThread;
|
|||
import haveno.common.app.DevEnv;
|
||||
import haveno.common.util.Tuple4;
|
||||
import haveno.core.locale.Res;
|
||||
import haveno.core.network.MessageState;
|
||||
import haveno.core.offer.Offer;
|
||||
import haveno.core.payment.PaymentAccount;
|
||||
import haveno.core.payment.PaymentAccountUtil;
|
||||
|
@ -158,7 +157,6 @@ public class BuyerStep2View extends TradeStepView {
|
|||
case BUYER_SAW_ARRIVED_PAYMENT_SENT_MSG:
|
||||
busyAnimation.play();
|
||||
statusLabel.setText(Res.get("shared.sendingConfirmation"));
|
||||
model.setMessageStatePropertyIfNotAcked(MessageState.SENT);
|
||||
timeoutTimer = UserThread.runAfter(() -> {
|
||||
busyAnimation.stop();
|
||||
statusLabel.setText(Res.get("shared.sendingConfirmationAgain"));
|
||||
|
@ -167,18 +165,15 @@ public class BuyerStep2View extends TradeStepView {
|
|||
case BUYER_STORED_IN_MAILBOX_PAYMENT_SENT_MSG:
|
||||
busyAnimation.stop();
|
||||
statusLabel.setText(Res.get("shared.messageStoredInMailbox"));
|
||||
model.setMessageStatePropertyIfNotAcked(MessageState.STORED_IN_MAILBOX);
|
||||
break;
|
||||
case SELLER_RECEIVED_PAYMENT_SENT_MSG:
|
||||
busyAnimation.stop();
|
||||
statusLabel.setText(Res.get("shared.messageArrived"));
|
||||
model.setMessageStatePropertyIfNotAcked(MessageState.ARRIVED);
|
||||
break;
|
||||
case BUYER_SEND_FAILED_PAYMENT_SENT_MSG:
|
||||
// We get a popup and the trade closed, so we dont need to show anything here
|
||||
busyAnimation.stop();
|
||||
statusLabel.setText("");
|
||||
model.setMessageStatePropertyIfNotAcked(MessageState.FAILED);
|
||||
break;
|
||||
default:
|
||||
log.warn("Unexpected case: State={}, tradeId={} ", state.name(), trade.getId());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue