From e82167b5e651f256616f7f2809d9f98017fcbb38 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Fri, 20 Nov 2020 17:29:56 +0100 Subject: [PATCH] correct wrong method name --- .../ui/vaultoptions/GeneralVaultOptionsController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/ui/src/main/java/org/cryptomator/ui/vaultoptions/GeneralVaultOptionsController.java b/main/ui/src/main/java/org/cryptomator/ui/vaultoptions/GeneralVaultOptionsController.java index b760ebf9a..e860ee811 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/vaultoptions/GeneralVaultOptionsController.java +++ b/main/ui/src/main/java/org/cryptomator/ui/vaultoptions/GeneralVaultOptionsController.java @@ -39,7 +39,7 @@ public class GeneralVaultOptionsController implements FxController { public void initialize() { vaultName.textProperty().set(vault.getVaultSettings().displayName().get()); vaultName.focusedProperty().addListener(this::trimVaultNameOnFocusLoss); - vaultName.setTextFormatter(new TextFormatter<>(this::checkVaultNameLength)); + vaultName.setTextFormatter(new TextFormatter<>(this::removeWhitespaces)); unlockOnStartupCheckbox.selectedProperty().bindBidirectional(vault.getVaultSettings().unlockAfterStartup()); actionAfterUnlockChoiceBox.getItems().addAll(WhenUnlocked.values()); actionAfterUnlockChoiceBox.valueProperty().bindBidirectional(vault.getVaultSettings().actionAfterUnlock()); @@ -53,7 +53,7 @@ public class GeneralVaultOptionsController implements FxController { } } - private TextFormatter.Change checkVaultNameLength(TextFormatter.Change change) { + private TextFormatter.Change removeWhitespaces(TextFormatter.Change change) { if (change.isContentChange() && change.getControlNewText().length() > VAULTNAME_TRUNCATE_THRESHOLD) { return null; // reject any change that would lead to a text exceeding threshold } else {