From 0d82f8827fb3e19614c0c82bd10f2327f7f074c5 Mon Sep 17 00:00:00 2001 From: woodser Date: Fri, 8 Nov 2024 08:14:16 -0500 Subject: [PATCH] dispute is pending until requested and chat disabled until acked --- core/src/main/java/haveno/core/support/dispute/Dispute.java | 4 ++++ .../main/java/haveno/core/support/dispute/DisputeSession.java | 2 +- .../java/haveno/desktop/main/support/dispute/DisputeView.java | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/haveno/core/support/dispute/Dispute.java b/core/src/main/java/haveno/core/support/dispute/Dispute.java index 5828710d71..268cb3e272 100644 --- a/core/src/main/java/haveno/core/support/dispute/Dispute.java +++ b/core/src/main/java/haveno/core/support/dispute/Dispute.java @@ -466,6 +466,10 @@ public final class Dispute implements NetworkPayload, PersistablePayload { return this.disputeState == State.NEW; } + public boolean isOpen() { + return this.disputeState == State.OPEN || this.disputeState == State.REOPENED; + } + public boolean isClosed() { return this.disputeState == State.CLOSED; } diff --git a/core/src/main/java/haveno/core/support/dispute/DisputeSession.java b/core/src/main/java/haveno/core/support/dispute/DisputeSession.java index 3b1b80e50f..5507fecc9e 100644 --- a/core/src/main/java/haveno/core/support/dispute/DisputeSession.java +++ b/core/src/main/java/haveno/core/support/dispute/DisputeSession.java @@ -70,7 +70,7 @@ public abstract class DisputeSession extends SupportSession { @Override public boolean chatIsOpen() { - return dispute != null && !dispute.isClosed(); + return dispute != null && dispute.isOpen(); } @Override diff --git a/desktop/src/main/java/haveno/desktop/main/support/dispute/DisputeView.java b/desktop/src/main/java/haveno/desktop/main/support/dispute/DisputeView.java index f62761d430..14e85b78c6 100644 --- a/desktop/src/main/java/haveno/desktop/main/support/dispute/DisputeView.java +++ b/desktop/src/main/java/haveno/desktop/main/support/dispute/DisputeView.java @@ -1420,6 +1420,8 @@ public abstract class DisputeView extends ActivatableView implements } if (dispute.isClosed()) return Res.get("support.closed"); switch (trade.getDisputeState()) { + case NO_DISPUTE: + return Res.get("shared.pending"); case DISPUTE_REQUESTED: return Res.get("support.requested"); default: