mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-20 03:31:27 +00:00
Fixed Next button for Invalid Vault Name
This commit is contained in:
@@ -40,7 +40,7 @@ public class CreateNewVaultNameController implements FxController {
|
||||
this.chooseLocationScene = chooseLocationScene;
|
||||
this.vaultPath = vaultPath;
|
||||
this.vaultName = vaultName;
|
||||
this.validVaultName = Bindings.createBooleanBinding(this::isValidVaultNameInternal, vaultName);
|
||||
this.validVaultName = Bindings.createBooleanBinding(this::isValidVaultName, vaultName);
|
||||
}
|
||||
|
||||
@FXML
|
||||
@@ -49,10 +49,6 @@ public class CreateNewVaultNameController implements FxController {
|
||||
vaultName.addListener(this::vaultNameChanged);
|
||||
}
|
||||
|
||||
private boolean isValidVaultNameInternal() {
|
||||
return vaultName.get() != null && VALID_NAME_PATTERN.matcher(vaultName.get().trim()).matches();
|
||||
}
|
||||
|
||||
private void vaultNameChanged(@SuppressWarnings("unused") Observable observable) {
|
||||
if (isValidVaultName()) {
|
||||
if (vaultPath.get() != null) {
|
||||
@@ -79,7 +75,15 @@ public class CreateNewVaultNameController implements FxController {
|
||||
}
|
||||
|
||||
public boolean isValidVaultName() {
|
||||
return validVaultName.get();
|
||||
return vaultName.get() != null && VALID_NAME_PATTERN.matcher(vaultName.get().trim()).matches();
|
||||
//return validVaultName.get();
|
||||
}
|
||||
/*
|
||||
* Issue with next button:
|
||||
* In the "addvault_new_location.fxml" class's method "buttonMinWidth," the next button was referring to an inValidVaultPath function which does not exist...
|
||||
* I changed it to "!controller.validVaultName" and that worked
|
||||
*
|
||||
* Other "issue" I noticed is that closing the application window does not stop the program. Unsure if this is a major issue.
|
||||
* */
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user