mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-04-18 00:26:54 -04:00
No longer lock vault on double click
See https://github.com/cryptomator/cryptomator/pull/3194#issuecomment-1806106843
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user