diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-04-01 22:18:02 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-04-01 22:18:02 +0200 |
commit | ce06763767906ca551c95a45197dc6aa237d5a04 (patch) | |
tree | 1c7dbff94b2d03ac6c1e8dcf1504eacfa096cc73 /src/main/java | |
parent | 0c9ba838e10d75713c2b51c22fb53a8ceb2f408c (diff) |
show password field only on non-logged in or magic created accounts
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/EditAccountActivity.java | 7 |
1 files changed, 6 insertions, 1 deletions
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); |