From 2c73b62f67e793b95c89515e6ad38218cef7d709 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 21 Nov 2018 16:45:38 +0100 Subject: [PATCH] make password editable on auth error --- src/main/java/eu/siacs/conversations/entities/Account.java | 2 +- .../java/eu/siacs/conversations/ui/EditAccountActivity.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/entities/Account.java b/src/main/java/eu/siacs/conversations/entities/Account.java index 55e330091..1fe74a6c8 100644 --- a/src/main/java/eu/siacs/conversations/entities/Account.java +++ b/src/main/java/eu/siacs/conversations/entities/Account.java @@ -270,7 +270,7 @@ public class Account extends AbstractEntity { public void setStatus(final State status) { this.status = status; - if (status.isError) { + if (status.isError || status == State.ONLINE) { this.lastErrorStatus = status; } } diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java index a2764dfff..66877d591 100644 --- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java @@ -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 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);