fix changePseudo
This commit is contained in:
parent
a44ec93869
commit
b9a1a15dca
1 changed files with 6 additions and 4 deletions
|
@ -190,16 +190,18 @@ public class Controller {
|
|||
|
||||
String tmpPseudo = view.PseudotextField.getText(); // Read user input
|
||||
|
||||
while(!(this.validatePseudo(tmpPseudo)) || tmpPseudo.equals(oldPseudo)) {
|
||||
if(!(this.validatePseudo(tmpPseudo)) || tmpPseudo.equals(oldPseudo)) {
|
||||
view.Pseudolabel.setText("Already exists, enter another nickname. Your current username is: " + oldPseudo); // Read user input
|
||||
tmpPseudo = view.PseudotextField.getText(); // Read user input
|
||||
}
|
||||
else {
|
||||
this.myUser.setPseudo(tmpPseudo);
|
||||
JOptionPane.showMessageDialog(null ,"Your new nickname : " + tmpPseudo + " is valid !");
|
||||
this.notify_remote_users();
|
||||
|
||||
this.myUser.setPseudo(tmpPseudo);
|
||||
}
|
||||
|
||||
JOptionPane.showMessageDialog(null ,"Your new nickname : " + tmpPseudo + " is valid !");
|
||||
|
||||
this.notify_remote_users();
|
||||
}
|
||||
/**
|
||||
* <p>
|
||||
|
|
Loading…
Reference in a new issue