修复 AccountDetailsInputPane 部分情况下未正确验证用户名的问题 (#5080)
This commit is contained in:
@@ -460,6 +460,9 @@ public class CreateAccountPane extends JFXDialogLayout implements DialogAware {
|
|||||||
onChangeAndOperate(cboServers.valueProperty(), server -> {
|
onChangeAndOperate(cboServers.valueProperty(), server -> {
|
||||||
this.server = server;
|
this.server = server;
|
||||||
linksContainer.getChildren().setAll(createHyperlinks(server));
|
linksContainer.getChildren().setAll(createHyperlinks(server));
|
||||||
|
|
||||||
|
if (txtUsername != null)
|
||||||
|
txtUsername.validate();
|
||||||
});
|
});
|
||||||
linksContainer.setMinWidth(USE_PREF_SIZE);
|
linksContainer.setMinWidth(USE_PREF_SIZE);
|
||||||
|
|
||||||
@@ -590,6 +593,9 @@ public class CreateAccountPane extends JFXDialogLayout implements DialogAware {
|
|||||||
if ((factory instanceof AuthlibInjectorAccountFactory) && this.server != null) {
|
if ((factory instanceof AuthlibInjectorAccountFactory) && this.server != null) {
|
||||||
return !server.isNonEmailLogin();
|
return !server.isNonEmailLogin();
|
||||||
}
|
}
|
||||||
|
if (factory instanceof BoundAuthlibInjectorAccountFactory bound) {
|
||||||
|
return !bound.getServer().isNonEmailLogin();
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user