From ef67d1f33bed7ef9dbd1f0830546ba980f284632 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Mon, 17 Jul 2023 11:44:16 +0200 Subject: [PATCH] show warning dialog on submit bug report to redirect users to support where appropriate --- .../com/sparrowwallet/sparrow/AppController.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/AppController.java b/src/main/java/com/sparrowwallet/sparrow/AppController.java index bace3f60..0d6617c0 100644 --- a/src/main/java/com/sparrowwallet/sparrow/AppController.java +++ b/src/main/java/com/sparrowwallet/sparrow/AppController.java @@ -469,7 +469,17 @@ public class AppController implements Initializable { } public void submitBugReport(ActionEvent event) { - AppServices.get().getApplication().getHostServices().showDocument("https://sparrowwallet.com/submitbugreport"); + ButtonType supportType = new ButtonType("Get Support", ButtonBar.ButtonData.LEFT); + ButtonType bugType = new ButtonType("Submit Bug Report", ButtonBar.ButtonData.YES); + Optional optResponse = showWarningDialog("Submit Bug Report", "Please note that this facility is for bug reports and feature requests only. There is a community of Sparrow users who can assist with support requests.", supportType, bugType); + + if(optResponse.isPresent()) { + if(optResponse.get() == bugType) { + AppServices.get().getApplication().getHostServices().showDocument("https://sparrowwallet.com/submitbugreport"); + } else { + openSupport(event); + } + } } public void showAbout(ActionEvent event) {