make password editable on auth error

This commit is contained in:
Daniel Gultsch 2018-11-21 16:45:38 +01:00
parent 2e0b26a5ab
commit 2c73b62f67
2 changed files with 2 additions and 2 deletions

View file

@ -270,7 +270,7 @@ public class Account extends AbstractEntity {
public void setStatus(final State status) { public void setStatus(final State status) {
this.status = status; this.status = status;
if (status.isError) { if (status.isError || status == State.ONLINE) {
this.lastErrorStatus = status; this.lastErrorStatus = status;
} }
} }

View file

@ -887,7 +887,7 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
final boolean tooglePassword = mAccount.isOptionSet(Account.OPTION_MAGIC_CREATE) || !mAccount.isOptionSet(Account.OPTION_LOGGED_IN_SUCCESSFULLY); final boolean tooglePassword = mAccount.isOptionSet(Account.OPTION_MAGIC_CREATE) || !mAccount.isOptionSet(Account.OPTION_LOGGED_IN_SUCCESSFULLY);
final boolean editPassword = !mAccount.isOptionSet(Account.OPTION_MAGIC_CREATE) || (!mAccount.isOptionSet(Account.OPTION_LOGGED_IN_SUCCESSFULLY) && QuickConversationsService.isConversations()); final boolean editPassword = !mAccount.isOptionSet(Account.OPTION_MAGIC_CREATE) || (!mAccount.isOptionSet(Account.OPTION_LOGGED_IN_SUCCESSFULLY) && QuickConversationsService.isConversations()) || mAccount.getLastErrorStatus() == Account.State.UNAUTHORIZED;
this.binding.accountPasswordLayout.setPasswordVisibilityToggleEnabled(tooglePassword); this.binding.accountPasswordLayout.setPasswordVisibilityToggleEnabled(tooglePassword);