Switch to ApplicationlessInjection in PlaceRenderer.java

This commit is contained in:
misaochan 2018-03-18 17:50:31 +10:00
parent efdfa38725
commit a0ecf1ff47

View file

@ -28,6 +28,7 @@ import butterknife.ButterKnife;
import fr.free.nrw.commons.CommonsApplication; import fr.free.nrw.commons.CommonsApplication;
import fr.free.nrw.commons.R; import fr.free.nrw.commons.R;
import fr.free.nrw.commons.contributions.ContributionController; import fr.free.nrw.commons.contributions.ContributionController;
import fr.free.nrw.commons.di.ApplicationlessInjection;
import timber.log.Timber; import timber.log.Timber;
public class PlaceRenderer extends Renderer<Place> { public class PlaceRenderer extends Renderer<Place> {
@ -141,7 +142,9 @@ public class PlaceRenderer extends Renderer<Place> {
@Override @Override
public void render() { public void render() {
//FIXME: injector() method has been removed from CommonsApplication.java //FIXME: injector() method has been removed from CommonsApplication.java
((CommonsApplication) getContext().getApplicationContext()).injector().inject(this); ApplicationlessInjection.getInstance(getContext().getApplicationContext())
.getCommonsApplicationComponent().inject(this);
//((CommonsApplication) getContext().getApplicationContext()).injector().inject(this);
place = getContent(); place = getContent();
tvName.setText(place.name); tvName.setText(place.name);
String descriptionText = place.getLongDescription(); String descriptionText = place.getLongDescription();