|
@@ -113,10 +113,12 @@ public class VaultListController implements FxController {
|
|
|
});
|
|
|
vaultList.addEventFilter(MouseEvent.MOUSE_RELEASED, this::deselect);
|
|
|
|
|
|
- //toggle selected vault lock status on double click
|
|
|
+ //unlock vault on double click
|
|
|
vaultList.addEventFilter(MouseEvent.MOUSE_CLICKED, click -> {
|
|
|
if (click.getClickCount() >= 2) {
|
|
|
- Optional.ofNullable(selectedVault.get()).ifPresent(this::toggleVaultLockStatus);
|
|
|
+ Optional.ofNullable(selectedVault.get())
|
|
|
+ .filter(Vault::isLocked)
|
|
|
+ .ifPresent(vault -> appWindows.startUnlockWorkflow(vault, mainWindow));
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -173,15 +175,6 @@ public class VaultListController implements FxController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void toggleVaultLockStatus(Vault vault) {
|
|
|
- if (vault.isLocked()) {
|
|
|
- appWindows.startUnlockWorkflow(vault, mainWindow);
|
|
|
- }
|
|
|
- if (vault.isUnlocked()) {
|
|
|
- appWindows.startLockWorkflow(vault, mainWindow);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
private void selectedVaultDidChange(@SuppressWarnings("unused") ObservableValue<? extends Vault> observableValue, @SuppressWarnings("unused") Vault oldValue, Vault newValue) {
|
|
|
if (newValue == null) {
|
|
|
return;
|