From 4a2df58165c83a7b800b4bf8c1beb2b6ee5a2513 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sat, 24 Sep 2016 23:58:01 +0200 Subject: add some more errors to UI if there where errors during account creation might fix #95 --- src/main/java/de/pixart/messenger/ui/EditAccountActivity.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/main/java/de/pixart/messenger/ui') 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); -- cgit v1.2.3