Compare commits
No commits in common. "08b916c5c52668c4bc6f11bab33ba1b570294d0c" and "e5c518d0786cc49049b134d8124ebac16b4612ab" have entirely different histories.
08b916c5c5
...
e5c518d078
2 changed files with 8 additions and 18 deletions
|
|
@ -151,18 +151,14 @@ public class MainController implements Initializable {
|
|||
Log.v(this.getClass().getSimpleName(), "Login shown");
|
||||
mainContainer.setVisible(false);
|
||||
loadingController.hide();
|
||||
if (isError) {
|
||||
Timer t = new Timer();
|
||||
t.schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
openEditUsernameDialog(EditUsernameDialogController.Mode.ERROR);
|
||||
t.cancel();
|
||||
}
|
||||
}, 500);
|
||||
} else {
|
||||
openEditUsernameDialog(EditUsernameDialogController.Mode.INITIAL);
|
||||
}
|
||||
Timer t = new Timer();
|
||||
t.schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
openEditUsernameDialog(isError ? EditUsernameDialogController.Mode.ERROR : EditUsernameDialogController.Mode.INITIAL);
|
||||
t.cancel();
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
|
||||
private void showError() {
|
||||
|
|
|
|||
|
|
@ -45,8 +45,6 @@ public class EditUsernameDialogController implements Initializable {
|
|||
private ButtonPressEvent cancelListener;
|
||||
private UserList userList;
|
||||
|
||||
private final int MAX_LENGTH = 16;
|
||||
|
||||
@FXML
|
||||
private void onConfirm() {
|
||||
setLocked(true);
|
||||
|
|
@ -103,10 +101,6 @@ public class EditUsernameDialogController implements Initializable {
|
|||
public void onUsernameChange(ObservableValue<? extends String> observable, String oldText, String newText) {
|
||||
setFieldError(State.VALID);
|
||||
confirmButton.setDisable(newText.isEmpty());
|
||||
if (textField.getText().length() > MAX_LENGTH) {
|
||||
String s = textField.getText().substring(0, MAX_LENGTH);
|
||||
textField.setText(s);
|
||||
}
|
||||
}
|
||||
|
||||
public void setMode(Mode mode) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue