mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-02 19:10:11 +01:00
Fixed lifecycle owners
This commit is contained in:
@@ -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>() {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user