From 8e1be4c67b66ece248008a011262c437f1f30393 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Mon, 17 May 2021 12:49:08 +0200 Subject: [PATCH] remove redundant property, fix logic error --- .../org/cryptomator/ui/health/CheckListController.java | 7 +++---- main/ui/src/main/resources/fxml/health_check_list.fxml | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/main/ui/src/main/java/org/cryptomator/ui/health/CheckListController.java b/main/ui/src/main/java/org/cryptomator/ui/health/CheckListController.java index 2982f01a6..fdad919cc 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/health/CheckListController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/health/CheckListController.java @@ -35,7 +35,6 @@ public class CheckListController implements FxController { private final SimpleObjectProperty> runningTask; private final Binding running; private final Binding finished; - private final BooleanBinding anyCheckSelected; private final BooleanBinding readyToRun; /* FXML */ @@ -51,7 +50,6 @@ public class CheckListController implements FxController { this.runningTask = new SimpleObjectProperty<>(); this.running = EasyBind.wrapNullable(runningTask).mapObservable(Worker::runningProperty).orElse(false); this.finished = EasyBind.wrapNullable(runningTask).mapObservable(Worker::stateProperty).map(endStates::contains).orElse(false); - this.anyCheckSelected = selectedTask.isNotNull(); this.readyToRun = runningTask.isNull(); } @@ -91,6 +89,7 @@ public class CheckListController implements FxController { try { reportWriter.writeReport(tasks); } catch (IOException e) { + //TODO: better error handling LOG.error("Failed to write health check report.", e); } } @@ -122,10 +121,10 @@ public class CheckListController implements FxController { } public boolean isAnyCheckSelected() { - return anyCheckSelected.get(); + return anyCheckSelectedProperty().get(); } public BooleanBinding anyCheckSelectedProperty() { - return anyCheckSelected; + return selectedTask.isNotNull(); } } diff --git a/main/ui/src/main/resources/fxml/health_check_list.fxml b/main/ui/src/main/resources/fxml/health_check_list.fxml index 93ceaaae7..b7520a08a 100644 --- a/main/ui/src/main/resources/fxml/health_check_list.fxml +++ b/main/ui/src/main/resources/fxml/health_check_list.fxml @@ -23,7 +23,7 @@