diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-09-24 23:58:01 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-09-24 23:58:01 +0200 |
commit | 4a2df58165c83a7b800b4bf8c1beb2b6ee5a2513 (patch) | |
tree | 4cc6755725bb37306d3399a0856750e8742d5882 /src/main/java/de/pixart/messenger/ui | |
parent | 8c2f2b671e5e9630dd6a56a49a33e6cd45694b03 (diff) |
add some more errors to UI if there where errors during account creation
might fix #95
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui')
-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); |