indicate if disconnected on startup, and display status with instruction on how to connect for longer

This commit is contained in:
Craig Raw 2024-03-14 09:36:02 +02:00
parent d2934c94c5
commit 14d0437424
2 changed files with 3 additions and 1 deletions

View file

@ -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);

View file

@ -201,6 +201,8 @@ public class AppServices {
} else {
restartServices();
}
} else {
EventManager.get().post(new DisconnectionEvent());
}
addURIHandlers();