diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/EditAccountActivity.java')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/EditAccountActivity.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java index 88623b600..8e58def2d 100644 --- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java +++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java @@ -187,6 +187,9 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate return; } if (registerNewAccount) { + if (XmppConnection.errorMessage != null) { + Toast.makeText(EditAccountActivity.this,XmppConnection.errorMessage,Toast.LENGTH_LONG).show(); + } if (!password.equals(passwordConfirm)) { mPasswordConfirm.setError(getString(R.string.passwords_do_not_match)); mPasswordConfirm.requestFocus(); @@ -200,7 +203,11 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate mAccount.setJid(jid); mAccount.setPort(numericPort); mAccount.setHostname(hostname); - mAccountJid.setError(null); + if (XmppConnection.errorMessage != null) { + mAccountJid.setError(XmppConnection.errorMessage); + } else { + mAccountJid.setError(null); + } mPasswordConfirm.setError(null); mAccount.setPassword(password); mAccount.setOption(Account.OPTION_REGISTER, registerNewAccount); |