aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-11-23 14:51:15 +0100
committerChristian Schneppe <christian@pix-art.de>2018-11-23 14:51:15 +0100
commit38bd7870148fee4a10f16a13d2f535db11f40ed4 (patch)
tree0a2ccffcc77de82514208aca86d8ebf20b2717b8 /src/main/java/de/pixart/messenger
parente23b95303f731431ef079995375aabe9a06fa93f (diff)
make password editable on auth error
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r--src/main/java/de/pixart/messenger/entities/Account.java2
-rw-r--r--src/main/java/de/pixart/messenger/ui/EditAccountActivity.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Account.java b/src/main/java/de/pixart/messenger/entities/Account.java
index 412960e48..1bdd130d5 100644
--- a/src/main/java/de/pixart/messenger/entities/Account.java
+++ b/src/main/java/de/pixart/messenger/entities/Account.java
@@ -278,7 +278,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/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
index edaf29608..59b3ae4c7 100644
--- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
@@ -964,7 +964,7 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
this.binding.accountJid.setFocusableInTouchMode(editable);
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.accountPassword.setFocusable(editPassword);
this.binding.accountPassword.setFocusableInTouchMode(editPassword);