allow mix counterparty to retry listening

This commit is contained in:
Craig Raw
2022-03-14 11:47:12 +02:00
parent d86517606b
commit ef5cca26ea
5 changed files with 21 additions and 3 deletions
@@ -25,6 +25,7 @@ public class ProgressTimer extends ProgressIndicator {
}
public void start(EventHandler<ActionEvent> onFinished) {
getStyleClass().remove("warn");
timeline = new Timeline(
new KeyFrame(Duration.ZERO, new KeyValue(progressProperty(), 0)),
new KeyFrame(Duration.seconds(getSeconds() * 0.8), e -> getStyleClass().add("warn")),
@@ -90,7 +90,7 @@ public class CounterpartyController extends SorobanController {
private PayNymAvatar mixPartnerAvatar;
@FXML
private Label meetingFail;
private Hyperlink meetingFail;
@FXML
private VBox mixDetails;
@@ -187,6 +187,15 @@ public class CounterpartyController extends SorobanController {
mixingPartner.managedProperty().bind(mixingPartner.visibleProperty());
meetingFail.managedProperty().bind(meetingFail.visibleProperty());
meetingFail.visibleProperty().bind(mixingPartner.visibleProperty().not());
meetingFail.setOnAction(event -> {
step2Desc.setText("Ask your mix partner to initiate the Soroban communication.");
mixingPartner.setVisible(true);
startCounterpartyMeetingReceive();
step2Timer.start(e -> {
step2Desc.setText("Mix declined due to timeout.");
meetingReceived.set(Boolean.FALSE);
});
});
mixDetails.managedProperty().bind(mixDetails.visibleProperty());
mixDetails.setVisible(false);