Browse Source

Fixed lifecycle owners

main
M66B 6 years ago
parent
commit
581e6eb50b
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      app/src/main/java/eu/faircode/email/FragmentCompose.java
  2. +2
    -2
      app/src/main/java/eu/faircode/email/FragmentSetup.java

+ 1
- 1
app/src/main/java/eu/faircode/email/FragmentCompose.java View File

@ -182,7 +182,7 @@ public class FragmentCompose extends Fragment {
bottom_navigation.getMenu().findItem(R.id.action_delete).setVisible(id > 0);
bottom_navigation.getMenu().setGroupEnabled(0, false);
DB.getInstance(getContext()).identity().liveIdentities(true).observe(getActivity(), new Observer<List<EntityIdentity>>() {
DB.getInstance(getContext()).identity().liveIdentities(true).observe(FragmentCompose.this, new Observer<List<EntityIdentity>>() {
@Override
public void onChanged(@Nullable final List<EntityIdentity> identities) {
Collections.sort(identities, new Comparator<EntityIdentity>() {


+ 2
- 2
app/src/main/java/eu/faircode/email/FragmentSetup.java View File

@ -82,7 +82,7 @@ public class FragmentSetup extends Fragment {
btnAccount.setEnabled(false);
pbAccount.setVisibility(View.VISIBLE);
DB.getInstance(getContext()).account().liveFirstAccount().observe(getActivity(), new Observer<EntityAccount>() {
DB.getInstance(getContext()).account().liveFirstAccount().observe(FragmentSetup.this, new Observer<EntityAccount>() {
@Override
public void onChanged(@Nullable EntityAccount account) {
btnAccount.setEnabled(true);
@ -116,7 +116,7 @@ public class FragmentSetup extends Fragment {
btnIdentity.setEnabled(false);
pbIdentity.setVisibility(View.VISIBLE);
DB.getInstance(getContext()).identity().liveFirstIdentity().observe(getActivity(), new Observer<EntityIdentity>() {
DB.getInstance(getContext()).identity().liveFirstIdentity().observe(FragmentSetup.this, new Observer<EntityIdentity>() {
@Override
public void onChanged(@Nullable EntityIdentity identity) {
btnIdentity.setEnabled(true);


Loading…
Cancel
Save