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");
|
Log.v(this.getClass().getSimpleName(), "Login shown");
|
||||||
mainContainer.setVisible(false);
|
mainContainer.setVisible(false);
|
||||||
loadingController.hide();
|
loadingController.hide();
|
||||||
if (isError) {
|
Timer t = new Timer();
|
||||||
Timer t = new Timer();
|
t.schedule(new TimerTask() {
|
||||||
t.schedule(new TimerTask() {
|
@Override
|
||||||
@Override
|
public void run() {
|
||||||
public void run() {
|
openEditUsernameDialog(isError ? EditUsernameDialogController.Mode.ERROR : EditUsernameDialogController.Mode.INITIAL);
|
||||||
openEditUsernameDialog(EditUsernameDialogController.Mode.ERROR);
|
t.cancel();
|
||||||
t.cancel();
|
}
|
||||||
}
|
}, 500);
|
||||||
}, 500);
|
|
||||||
} else {
|
|
||||||
openEditUsernameDialog(EditUsernameDialogController.Mode.INITIAL);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showError() {
|
private void showError() {
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,6 @@ public class EditUsernameDialogController implements Initializable {
|
||||||
private ButtonPressEvent cancelListener;
|
private ButtonPressEvent cancelListener;
|
||||||
private UserList userList;
|
private UserList userList;
|
||||||
|
|
||||||
private final int MAX_LENGTH = 16;
|
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private void onConfirm() {
|
private void onConfirm() {
|
||||||
setLocked(true);
|
setLocked(true);
|
||||||
|
|
@ -103,10 +101,6 @@ public class EditUsernameDialogController implements Initializable {
|
||||||
public void onUsernameChange(ObservableValue<? extends String> observable, String oldText, String newText) {
|
public void onUsernameChange(ObservableValue<? extends String> observable, String oldText, String newText) {
|
||||||
setFieldError(State.VALID);
|
setFieldError(State.VALID);
|
||||||
confirmButton.setDisable(newText.isEmpty());
|
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) {
|
public void setMode(Mode mode) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue