mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-24 17:52:17 -05:00
display proper error in edit account details if jid is invalid
This commit is contained in:
parent
8f62d95e1f
commit
685f405154
@ -74,14 +74,15 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
|
||||
return;
|
||||
}
|
||||
boolean registerNewAccount = mRegisterNew.isChecked();
|
||||
final Jid jid;
|
||||
try {
|
||||
jid = Jid.fromString(mAccountJid.getText().toString());
|
||||
} catch (final InvalidJidException e) {
|
||||
// TODO: Handle this error?
|
||||
return;
|
||||
}
|
||||
String password = mPassword.getText().toString();
|
||||
final Jid jid;
|
||||
try {
|
||||
jid = Jid.fromString(mAccountJid.getText().toString());
|
||||
} catch (final InvalidJidException e) {
|
||||
mAccountJid.setError(getString(R.string.invalid_jid));
|
||||
mAccountJid.requestFocus();
|
||||
return;
|
||||
}
|
||||
String password = mPassword.getText().toString();
|
||||
String passwordConfirm = mPasswordConfirm.getText().toString();
|
||||
if (registerNewAccount) {
|
||||
if (!password.equals(passwordConfirm)) {
|
||||
|
Loading…
Reference in New Issue
Block a user