diff --git a/app/src/main/java/eu/faircode/email/FragmentAccount.java b/app/src/main/java/eu/faircode/email/FragmentAccount.java index f53f65ee..4b845c66 100644 --- a/app/src/main/java/eu/faircode/email/FragmentAccount.java +++ b/app/src/main/java/eu/faircode/email/FragmentAccount.java @@ -126,8 +126,6 @@ public class FragmentAccount extends FragmentEx { adapter.setDropDownViewResource(R.layout.spinner_dropdown_item); spProfile.setAdapter(adapter); - pbCheck.setVisibility(View.GONE); - cbSynchronize.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { @@ -155,6 +153,11 @@ public class FragmentAccount extends FragmentEx { } }); + // Initialize + tilPassword.setPasswordVisibilityToggleEnabled(id < 0); + pbCheck.setVisibility(View.GONE); + + // Observe DB.getInstance(getContext()).account().liveAccount(id).observe(this, new Observer() { @Override public void onChanged(@Nullable EntityAccount account) { diff --git a/app/src/main/java/eu/faircode/email/FragmentIdentity.java b/app/src/main/java/eu/faircode/email/FragmentIdentity.java index 07b5fff2..490287f9 100644 --- a/app/src/main/java/eu/faircode/email/FragmentIdentity.java +++ b/app/src/main/java/eu/faircode/email/FragmentIdentity.java @@ -144,8 +144,6 @@ public class FragmentIdentity extends FragmentEx { adapter.setDropDownViewResource(R.layout.spinner_dropdown_item); spProfile.setAdapter(adapter); - pbCheck.setVisibility(View.GONE); - cbSynchronize.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton compoundButton, boolean checked) { @@ -176,6 +174,11 @@ public class FragmentIdentity extends FragmentEx { } }); + // Initialize + tilPassword.setPasswordVisibilityToggleEnabled(id < 0); + pbCheck.setVisibility(View.GONE); + + // Observer DB.getInstance(getContext()).identity().liveIdentity(id).observe(this, new Observer() { @Override public void onChanged(@Nullable EntityIdentity identity) {