Search in sources :

Example 1 with DisputeAlreadyOpenException

use of io.bitsquare.arbitration.DisputeAlreadyOpenException in project bitsquare by bitsquare.

the class PendingTradesDataModel method sendOpenNewDisputeMessage.

private void sendOpenNewDisputeMessage(Dispute dispute, boolean reOpen) {
    disputeManager.sendOpenNewDisputeMessage(dispute, reOpen, () -> navigation.navigateTo(MainView.class, DisputesView.class), (errorMessage, throwable) -> {
        if ((throwable instanceof DisputeAlreadyOpenException)) {
            errorMessage += "\n\n" + "If you are not sure that the message to the arbitrator arrived (e.g. if you did not got " + "a response after 1 day) feel free to open a dispute again.";
            new Popup().warning(errorMessage).actionButtonText("Open dispute again").onAction(() -> sendOpenNewDisputeMessage(dispute, true)).closeButtonText("Cancel").show();
        } else {
            new Popup().warning(errorMessage).show();
        }
    });
}
Also used : MainView(io.bitsquare.gui.main.MainView) Popup(io.bitsquare.gui.main.overlays.popups.Popup) DisputesView(io.bitsquare.gui.main.disputes.DisputesView) DisputeAlreadyOpenException(io.bitsquare.arbitration.DisputeAlreadyOpenException)

Aggregations

DisputeAlreadyOpenException (io.bitsquare.arbitration.DisputeAlreadyOpenException)1 MainView (io.bitsquare.gui.main.MainView)1 DisputesView (io.bitsquare.gui.main.disputes.DisputesView)1 Popup (io.bitsquare.gui.main.overlays.popups.Popup)1