From ce06763767906ca551c95a45197dc6aa237d5a04 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sun, 1 Apr 2018 22:18:02 +0200 Subject: show password field only on non-logged in or magic created accounts --- src/main/java/de/pixart/messenger/ui/EditAccountActivity.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main/java/de') diff --git a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java index eddbc44b6..9a1eb696c 100644 --- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java +++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java @@ -1014,7 +1014,12 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat this.binding.accountJid.setEnabled(editable); this.binding.accountJid.setFocusable(editable); this.binding.accountJid.setFocusableInTouchMode(editable); - this.mPasswordLayout.setPasswordVisibilityToggleEnabled(editable); + + if (mAccount.isOptionSet(Account.OPTION_MAGIC_CREATE) || !mAccount.isOptionSet(Account.OPTION_LOGGED_IN_SUCCESSFULLY)) { + this.binding.accountPasswordLayout.setPasswordVisibilityToggleEnabled(true); + } else { + this.binding.accountPasswordLayout.setPasswordVisibilityToggleEnabled(false); + } if (!mInitMode) { this.mAvatar.setVisibility(View.VISIBLE); -- cgit v1.2.3