This commit is contained in:
Armin Schrenk 2023-04-17 12:51:36 +02:00
parent 4305fd3285
commit 2a01aba3cf
No known key found for this signature in database
GPG Key ID: 8F2992163CBBA7FC
2 changed files with 3 additions and 12 deletions

View File

@ -102,9 +102,9 @@ public class HubToLocalConvertController implements FxController {
Preconditions.checkState(newPasswordController.isGoodPassword()); Preconditions.checkState(newPasswordController.isGoodPassword());
LOG.info("Converting hub vault {} to local", vault.getPath()); LOG.info("Converting hub vault {} to local", vault.getPath());
CompletableFuture.runAsync(() -> conversionStarted.setValue(true), Platform::runLater) // CompletableFuture.runAsync(() -> conversionStarted.setValue(true), Platform::runLater) //
.thenRunAsync(this::convertInternal, backgroundExecutorService) //TODO: which executor is used? .thenRunAsync(this::convertInternal, backgroundExecutorService)
.whenCompleteAsync((result, exception) -> { .whenCompleteAsync((result, exception) -> {
if (exception == null) { //TODO: check, how the exceptions are wrapped if (exception == null) {
LOG.info("Conversion of vault {} succeeded.", vault.getPath()); LOG.info("Conversion of vault {} succeeded.", vault.getPath());
window.setScene(successScene.get()); window.setScene(successScene.get());
} else { } else {

View File

@ -10,24 +10,15 @@ import javafx.stage.Stage;
public class HubToLocalSuccessController implements FxController { public class HubToLocalSuccessController implements FxController {
private final FxApplicationWindows appWindows;
private final Stage window; private final Stage window;
private final Vault vault; private final Vault vault;
@Inject @Inject
HubToLocalSuccessController(FxApplicationWindows appWindows, @ConvertVaultWindow Stage window, @ConvertVaultWindow Vault vault) { HubToLocalSuccessController(@ConvertVaultWindow Stage window, @ConvertVaultWindow Vault vault) {
this.appWindows = appWindows;
this.window = window; this.window = window;
this.vault = vault; this.vault = vault;
} }
@FXML
public void unlockAndClose() {
close();
vault.getVaultConfigCache();
appWindows.startUnlockWorkflow(vault, window);
}
@FXML @FXML
public void close() { public void close() {
window.close(); window.close();