From 1ae6042ca88c0904baa4250a14684b6261011e4e Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 4 Mar 2018 13:59:36 +0100 Subject: [PATCH] show password field only on non-logged in or magic created accounts --- .../eu/siacs/conversations/ui/EditAccountActivity.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java index 4b374201a..c9c58a521 100644 --- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java @@ -966,10 +966,12 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat this.binding.accountJid.setEnabled(editable); this.binding.accountJid.setFocusable(editable); this.binding.accountJid.setFocusableInTouchMode(editable); - if (editable) { - this.mPassword.setCustomSelectionActionModeCallback(null); + + + if (mAccount.isOptionSet(Account.OPTION_MAGIC_CREATE) || !mAccount.isOptionSet(Account.OPTION_LOGGED_IN_SUCCESSFULLY)) { + this.binding.accountPasswordLayout.setPasswordVisibilityToggleEnabled(true); } else { - this.mPassword.setCustomSelectionActionModeCallback(new DisabledActionModeCallback()); + this.binding.accountPasswordLayout.setPasswordVisibilityToggleEnabled(false); } if (!mInitMode) {