|
@@ -32,19 +32,17 @@ public class RecoveryKeyCreationController implements FxController {
|
|
|
private final ExecutorService executor;
|
|
|
private final RecoveryKeyFactory recoveryKeyFactory;
|
|
|
private final StringProperty recoveryKeyProperty;
|
|
|
- private final Lazy<Scene> createScene;
|
|
|
private final ErrorComponent.Builder errorComponent;
|
|
|
public NiceSecurePasswordField passwordField;
|
|
|
|
|
|
@Inject
|
|
|
- public RecoveryKeyCreationController(@RecoveryKeyWindow Stage window, @FxmlScene(FxmlFile.RECOVERYKEY_SUCCESS) Lazy<Scene> successScene, @RecoveryKeyWindow Vault vault, RecoveryKeyFactory recoveryKeyFactory, ExecutorService executor, @RecoveryKeyWindow StringProperty recoveryKey, @FxmlScene(FxmlFile.RECOVERYKEY_CREATE) Lazy<Scene> createScene, ErrorComponent.Builder errorComponent) {
|
|
|
+ public RecoveryKeyCreationController(@RecoveryKeyWindow Stage window, @FxmlScene(FxmlFile.RECOVERYKEY_SUCCESS) Lazy<Scene> successScene, @RecoveryKeyWindow Vault vault, RecoveryKeyFactory recoveryKeyFactory, ExecutorService executor, @RecoveryKeyWindow StringProperty recoveryKey, ErrorComponent.Builder errorComponent) {
|
|
|
this.window = window;
|
|
|
this.successScene = successScene;
|
|
|
this.vault = vault;
|
|
|
this.executor = executor;
|
|
|
this.recoveryKeyFactory = recoveryKeyFactory;
|
|
|
this.recoveryKeyProperty = recoveryKey;
|
|
|
- this.createScene = createScene;
|
|
|
this.errorComponent = errorComponent;
|
|
|
}
|
|
|
|
|
@@ -64,7 +62,7 @@ public class RecoveryKeyCreationController implements FxController {
|
|
|
Animations.createShakeWindowAnimation(window).play();
|
|
|
} else {
|
|
|
LOG.error("Creation of recovery key failed.", task.getException());
|
|
|
- errorComponent.cause(task.getException()).window(window).returnToScene(createScene.get()).build().showErrorScene();
|
|
|
+ errorComponent.cause(task.getException()).window(window).returnToScene(window.getScene()).build().showErrorScene();
|
|
|
}
|
|
|
});
|
|
|
executor.submit(task);
|