reset error status in edit account when reconnecting

This commit is contained in:
iNPUTmice 2015-02-26 17:17:40 +01:00
parent 1b579f512c
commit a022e4b41a

View file

@ -102,6 +102,8 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
} catch (final InvalidJidException ignored) { } catch (final InvalidJidException ignored) {
return; return;
} }
mAccountJid.setError(null);
mPasswordConfirm.setError(null);
mAccount.setPassword(password); mAccount.setPassword(password);
mAccount.setOption(Account.OPTION_REGISTER, registerNewAccount); mAccount.setOption(Account.OPTION_REGISTER, registerNewAccount);
xmppConnectionService.updateAccount(mAccount); xmppConnectionService.updateAccount(mAccount);
@ -493,6 +495,8 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
if (this.mAccount.errorStatus()) { if (this.mAccount.errorStatus()) {
this.mAccountJid.setError(getString(this.mAccount.getStatus().getReadableId())); this.mAccountJid.setError(getString(this.mAccount.getStatus().getReadableId()));
this.mAccountJid.requestFocus(); this.mAccountJid.requestFocus();
} else {
this.mAccountJid.setError(null);
} }
this.mStats.setVisibility(View.GONE); this.mStats.setVisibility(View.GONE);
} }