From 8cfeb853a701612ecb904b19792c8f2e9de83a80 Mon Sep 17 00:00:00 2001 From: 0xb00bface <0xboobface@gmail.com> Date: Wed, 19 Aug 2020 14:27:37 +0200 Subject: [PATCH] Show shutdown confirmation dialog only in standalone mode --- .../java/ctbrec/ui/CamrecApplication.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/client/src/main/java/ctbrec/ui/CamrecApplication.java b/client/src/main/java/ctbrec/ui/CamrecApplication.java index 6dde753e..d5bb44cb 100644 --- a/client/src/main/java/ctbrec/ui/CamrecApplication.java +++ b/client/src/main/java/ctbrec/ui/CamrecApplication.java @@ -254,17 +254,19 @@ public class CamrecApplication extends Application { // check for active recordings boolean shutdownNow = false; - try { - if (!recorder.getCurrentlyRecording().isEmpty()) { - ButtonType result = Dialogs.showShutdownDialog(primaryStage.getScene()); - if(result == ButtonType.NO) { - return; - } else if(result == ButtonType.YES) { - shutdownNow = true; + if (config.getSettings().localRecording) { + try { + if (!recorder.getCurrentlyRecording().isEmpty()) { + ButtonType result = Dialogs.showShutdownDialog(primaryStage.getScene()); + if (result == ButtonType.NO) { + return; + } else if (result == ButtonType.YES) { + shutdownNow = true; + } } + } catch (InvalidKeyException | NoSuchAlgorithmException | IOException ex) { + LOG.warn("Couldn't check, if recordings are running"); } - } catch (InvalidKeyException | NoSuchAlgorithmException | IOException ex) { - LOG.warn("Couldn't check, if recordings are running"); } Alert shutdownInfo = new AutosizeAlert(Alert.AlertType.INFORMATION, primaryStage.getScene());