From 14d04374245cbedc1b716cb2affb06c4fee27d72 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Thu, 14 Mar 2024 09:36:02 +0200 Subject: [PATCH] indicate if disconnected on startup, and display status with instruction on how to connect for longer --- src/main/java/com/sparrowwallet/sparrow/AppController.java | 2 +- src/main/java/com/sparrowwallet/sparrow/AppServices.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/AppController.java b/src/main/java/com/sparrowwallet/sparrow/AppController.java index f51fd9f9..47b006ac 100644 --- a/src/main/java/com/sparrowwallet/sparrow/AppController.java +++ b/src/main/java/com/sparrowwallet/sparrow/AppController.java @@ -2753,7 +2753,7 @@ public class AppController implements Initializable { public void disconnection(DisconnectionEvent event) { serverToggle.setDisable(false); if(!AppServices.isConnecting() && !AppServices.isConnected() && !statusBar.getText().startsWith(CONNECTION_FAILED_PREFIX) && !statusBar.getText().contains(TRYING_ANOTHER_SERVER_MESSAGE)) { - statusUpdated(new StatusEvent("Disconnected")); + statusUpdated(new StatusEvent("Disconnected (click toggle on the right to connect)", 240)); } if(statusTimeline == null || statusTimeline.getStatus() != Animation.Status.RUNNING) { statusBar.setProgress(0); diff --git a/src/main/java/com/sparrowwallet/sparrow/AppServices.java b/src/main/java/com/sparrowwallet/sparrow/AppServices.java index 5f4c5fe7..4c68c86d 100644 --- a/src/main/java/com/sparrowwallet/sparrow/AppServices.java +++ b/src/main/java/com/sparrowwallet/sparrow/AppServices.java @@ -201,6 +201,8 @@ public class AppServices { } else { restartServices(); } + } else { + EventManager.get().post(new DisconnectionEvent()); } addURIHandlers();