From c47ce2c7304f12ddf756c5c29ad361cc15cea3e3 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Fri, 20 Nov 2020 11:25:39 +0100 Subject: [PATCH] clean up --- .../org/cryptomator/ui/lock/LockFailedController.java | 1 + .../org/cryptomator/ui/lock/LockForcedController.java | 1 + .../main/java/org/cryptomator/ui/lock/LockWorkflow.java | 9 +++++---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/main/ui/src/main/java/org/cryptomator/ui/lock/LockFailedController.java b/main/ui/src/main/java/org/cryptomator/ui/lock/LockFailedController.java index 66dd203ea..d458ffa3f 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/lock/LockFailedController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/lock/LockFailedController.java @@ -4,6 +4,7 @@ import org.cryptomator.ui.common.FxController; import javax.inject.Inject; +@LockScoped public class LockFailedController implements FxController { @Inject diff --git a/main/ui/src/main/java/org/cryptomator/ui/lock/LockForcedController.java b/main/ui/src/main/java/org/cryptomator/ui/lock/LockForcedController.java index 7e5075a35..995275e41 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/lock/LockForcedController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/lock/LockForcedController.java @@ -11,6 +11,7 @@ import javafx.event.ActionEvent; import javafx.stage.Stage; import javafx.stage.WindowEvent; +@LockScoped public class LockForcedController implements FxController { private static final Logger LOG = LoggerFactory.getLogger(LockForcedController.class); diff --git a/main/ui/src/main/java/org/cryptomator/ui/lock/LockWorkflow.java b/main/ui/src/main/java/org/cryptomator/ui/lock/LockWorkflow.java index 01084839b..07fda5d17 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/lock/LockWorkflow.java +++ b/main/ui/src/main/java/org/cryptomator/ui/lock/LockWorkflow.java @@ -21,9 +21,10 @@ import javafx.stage.Window; * The sequence of actions performed and checked during lock of a vault. *

* This class implements the Task interface, sucht that it can run in the background with some possible forground operations/requests to the ui, without blocking the main app. - * If the task succeeded, the vault was successfully locked. - * If the task is canceled, the lock was canceled. - * If the task failed, the lock failed due to an exception. + * If the task state is + *

  • succeeded, the vault was successfully locked;
  • + *
  • canceled, the lock was canceled;
  • + *
  • failed, the lock failed due to an exception.
  • */ public class LockWorkflow extends Task { @@ -81,7 +82,7 @@ public class LockWorkflow extends Task { vault.lock(true); return true; case CANCEL: - this.cancel(false); + cancel(false); return false; default: return false;