mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Fix memory leak due to wikidata edit listener (#2048)
This commit is contained in:
parent
6391307fad
commit
f2d271af37
1 changed files with 3 additions and 1 deletions
|
|
@ -114,7 +114,6 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
|
|||
resumeFragment();*/
|
||||
bundle = new Bundle();
|
||||
initBottomSheetBehaviour();
|
||||
wikidataEditListener.setAuthenticationStateListener(this);
|
||||
this.view = view;
|
||||
return view;
|
||||
}
|
||||
|
|
@ -642,6 +641,7 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
|
|||
@Override
|
||||
public void onAttach(Context context) {
|
||||
super.onAttach(context);
|
||||
wikidataEditListener.setAuthenticationStateListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -650,6 +650,7 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
|
|||
if (placesDisposable != null) {
|
||||
placesDisposable.dispose();
|
||||
}
|
||||
wikidataEditListener.setAuthenticationStateListener(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -657,6 +658,7 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
|
|||
super.onDetach();
|
||||
snackbar = null;
|
||||
broadcastReceiver = null;
|
||||
wikidataEditListener.setAuthenticationStateListener(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue