show password field only on non-logged in or magic created accounts

This commit is contained in:
Daniel Gultsch 2018-03-04 13:59:36 +01:00
parent a4f4c80743
commit 1ae6042ca8

View file

@ -966,10 +966,12 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
this.binding.accountJid.setEnabled(editable); this.binding.accountJid.setEnabled(editable);
this.binding.accountJid.setFocusable(editable); this.binding.accountJid.setFocusable(editable);
this.binding.accountJid.setFocusableInTouchMode(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 { } else {
this.mPassword.setCustomSelectionActionModeCallback(new DisabledActionModeCallback()); this.binding.accountPasswordLayout.setPasswordVisibilityToggleEnabled(false);
} }
if (!mInitMode) { if (!mInitMode) {