mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Refactor usage of dagger application with fixed dagger application
This commit is contained in:
parent
1224302ccb
commit
e1afa6081e
32 changed files with 556 additions and 311 deletions
|
|
@ -14,6 +14,7 @@ import com.facebook.drawee.view.SimpleDraweeView;
|
|||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import fr.free.nrw.commons.di.ApplicationlessInjection;
|
||||
import fr.free.nrw.commons.mwapi.MediaWikiApi;
|
||||
import timber.log.Timber;
|
||||
|
||||
|
|
@ -71,7 +72,11 @@ public class MediaWikiImageView extends SimpleDraweeView {
|
|||
* Initializes MediaWikiImageView.
|
||||
*/
|
||||
private void init() {
|
||||
((CommonsApplication) getContext().getApplicationContext()).injector().inject(this);
|
||||
ApplicationlessInjection
|
||||
.getInstance(getContext()
|
||||
.getApplicationContext())
|
||||
.getCommonsApplicationComponent()
|
||||
.inject(this);
|
||||
setHierarchy(GenericDraweeHierarchyBuilder
|
||||
.newInstance(getResources())
|
||||
.setPlaceholderImage(VectorDrawableCompat.create(getResources(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue