This commit is contained in:
Armin Schrenk
2020-11-20 11:25:39 +01:00
parent 4db57cc0dc
commit c47ce2c730
3 changed files with 7 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ import org.cryptomator.ui.common.FxController;
import javax.inject.Inject;
@LockScoped
public class LockFailedController implements FxController {
@Inject

View File

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

View File

@@ -21,9 +21,10 @@ import javafx.stage.Window;
* The sequence of actions performed and checked during lock of a vault.
* <p>
* 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
* <li>succeeded, the vault was successfully locked;</li>
* <li>canceled, the lock was canceled;</li>
* <li>failed, the lock failed due to an exception.</li>
*/
public class LockWorkflow extends Task<Void> {
@@ -81,7 +82,7 @@ public class LockWorkflow extends Task<Void> {
vault.lock(true);
return true;
case CANCEL:
this.cancel(false);
cancel(false);
return false;
default:
return false;