소스 검색

correct wrong method name

Armin Schrenk 4 년 전
부모
커밋
e82167b5e6
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      main/ui/src/main/java/org/cryptomator/ui/vaultoptions/GeneralVaultOptionsController.java

+ 2 - 2
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 {