Signed Offers view only appears for arbitrator

This commit is contained in:
woodser 2023-04-19 08:04:12 -04:00
parent d6122020f2
commit d0a6646bcd

View file

@ -163,10 +163,17 @@ public class SupportView extends ActivatableView<TabPane, Void> {
// In case a arbitrator has become inactive he still might get disputes from pending trades // In case a arbitrator has become inactive he still might get disputes from pending trades
boolean hasDisputesAsArbitrator = arbitrationManager.getDisputesAsObservableList().stream() boolean hasDisputesAsArbitrator = arbitrationManager.getDisputesAsObservableList().stream()
.anyMatch(d -> d.getAgentPubKeyRing().equals(myPubKeyRing)); .anyMatch(d -> d.getAgentPubKeyRing().equals(myPubKeyRing));
if (arbitratorTab == null && (isActiveArbitrator || hasDisputesAsArbitrator)) { if (isActiveArbitrator || hasDisputesAsArbitrator) {
arbitratorTab = new Tab(); if (arbitratorTab == null) {
arbitratorTab.setClosable(false); arbitratorTab = new Tab();
root.getTabs().add(arbitratorTab); arbitratorTab.setClosable(false);
root.getTabs().add(arbitratorTab);
}
if (signedOfferTab == null) {
signedOfferTab = new Tab();
signedOfferTab.setClosable(false);
root.getTabs().add(signedOfferTab);
}
} }
} }
@ -183,12 +190,6 @@ public class SupportView extends ActivatableView<TabPane, Void> {
} }
} }
if (signedOfferTab == null) {
signedOfferTab = new Tab();
signedOfferTab.setClosable(false);
root.getTabs().add(signedOfferTab);
}
boolean isActiveRefundAgent = refundAgentManager.getObservableMap().values().stream() boolean isActiveRefundAgent = refundAgentManager.getObservableMap().values().stream()
.anyMatch(e -> e.getPubKeyRing() != null && e.getPubKeyRing().equals(myPubKeyRing)); .anyMatch(e -> e.getPubKeyRing() != null && e.getPubKeyRing().equals(myPubKeyRing));
if (refundAgentTab == null) { if (refundAgentTab == null) {