mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Move Dagger injection to method that is called later, to prevent NPE
This commit is contained in:
parent
119c4fb782
commit
94687090bd
1 changed files with 1 additions and 1 deletions
|
|
@ -70,7 +70,6 @@ public class PlaceRenderer extends Renderer<Place> {
|
|||
*/
|
||||
public PlaceRenderer(Fragment fragment) {
|
||||
this.fragment = fragment;
|
||||
((CommonsApplication) getContext().getApplicationContext()).injector().inject(this);
|
||||
openedItems = new ArrayList<>();
|
||||
}
|
||||
|
||||
|
|
@ -144,6 +143,7 @@ public class PlaceRenderer extends Renderer<Place> {
|
|||
|
||||
@Override
|
||||
public void render() {
|
||||
((CommonsApplication) getContext().getApplicationContext()).injector().inject(this);
|
||||
place = getContent();
|
||||
tvName.setText(place.name);
|
||||
String descriptionText = place.getLongDescription();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue