mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 05:13:53 +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();*/
|
resumeFragment();*/
|
||||||
bundle = new Bundle();
|
bundle = new Bundle();
|
||||||
initBottomSheetBehaviour();
|
initBottomSheetBehaviour();
|
||||||
wikidataEditListener.setAuthenticationStateListener(this);
|
|
||||||
this.view = view;
|
this.view = view;
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
@ -642,6 +641,7 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
|
||||||
@Override
|
@Override
|
||||||
public void onAttach(Context context) {
|
public void onAttach(Context context) {
|
||||||
super.onAttach(context);
|
super.onAttach(context);
|
||||||
|
wikidataEditListener.setAuthenticationStateListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -650,6 +650,7 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
|
||||||
if (placesDisposable != null) {
|
if (placesDisposable != null) {
|
||||||
placesDisposable.dispose();
|
placesDisposable.dispose();
|
||||||
}
|
}
|
||||||
|
wikidataEditListener.setAuthenticationStateListener(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -657,6 +658,7 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
|
||||||
super.onDetach();
|
super.onDetach();
|
||||||
snackbar = null;
|
snackbar = null;
|
||||||
broadcastReceiver = null;
|
broadcastReceiver = null;
|
||||||
|
wikidataEditListener.setAuthenticationStateListener(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue