Skip to content

Commit

Permalink
fix: prevent multiple initialize on android
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Aug 27, 2019
1 parent 6df2df9 commit a868d10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/image.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ImageAsset } from 'tns-core-modules/image-asset/image-asset';
let BaseDataSubscriber: new (onNewResult: () => void, onFailure: () => void) => com.facebook.datasource.BaseDataSubscriber<any>;

export function initialize(config?: ImagePipelineConfigSetting): void {
if (application.android) {
if (application.android && !com.facebook.drawee.backends.pipeline.Fresco.hasBeenInitialized()) {
if (config && config.isDownsampleEnabled) {
const imagePipelineConfig = com.facebook.imagepipeline.core.ImagePipelineConfig.newBuilder(application.android.context)
.setDownsampleEnabled(true)
Expand Down

0 comments on commit a868d10

Please sign in to comment.