Skip to content

Commit

Permalink
Merge pull request #3414 from MSevenR/feature/double-click-unlocked-v…
Browse files Browse the repository at this point in the history
…ault

Double-click on an Unlocked Vault
  • Loading branch information
mindmonk committed May 2, 2024
2 parents 0585262 + d6ed88b commit 1ab808f
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.cryptomator.cryptofs.DirStructure;
import org.cryptomator.ui.addvaultwizard.AddVaultWizardComponent;
import org.cryptomator.ui.common.FxController;
import org.cryptomator.ui.common.VaultService;
import org.cryptomator.ui.fxapp.FxApplicationWindows;
import org.cryptomator.ui.removevault.RemoveVaultComponent;
import org.slf4j.Logger;
Expand Down Expand Up @@ -58,6 +59,7 @@ public class VaultListController implements FxController {

private final Stage mainWindow;
private final ObservableList<Vault> vaults;
private final VaultService vaultService;
private final ObjectProperty<Vault> selectedVault;
private final VaultListCellFactory cellFactory;
private final AddVaultWizardComponent.Builder addVaultWizard;
Expand All @@ -79,6 +81,7 @@ public class VaultListController implements FxController {
ObservableList<Vault> vaults, //
ObjectProperty<Vault> selectedVault, //
VaultListCellFactory cellFactory, //
VaultService vaultService, //
AddVaultWizardComponent.Builder addVaultWizard, //
RemoveVaultComponent.Builder removeVaultDialogue, //
VaultListManager vaultListManager, //
Expand All @@ -88,6 +91,7 @@ public class VaultListController implements FxController {
this.vaults = vaults;
this.selectedVault = selectedVault;
this.cellFactory = cellFactory;
this.vaultService = vaultService;
this.addVaultWizard = addVaultWizard;
this.removeVaultDialogue = removeVaultDialogue;
this.vaultListManager = vaultListManager;
Expand Down Expand Up @@ -119,6 +123,9 @@ public void initialize() {
Optional.ofNullable(selectedVault.get())
.filter(Vault::isLocked)
.ifPresent(vault -> appWindows.startUnlockWorkflow(vault, mainWindow));
Optional.ofNullable(selectedVault.get())
.filter(Vault::isUnlocked)
.ifPresent(vaultService::reveal);
}
});

Expand Down

0 comments on commit 1ab808f

Please sign in to comment.