mirror of
https://github.com/cryptomator/cryptomator.git
synced 2024-10-07 01:03:31 +00:00
clean up
This commit is contained in:
parent
4305fd3285
commit
2a01aba3cf
@ -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 {
|
||||||
|
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user