Skip to content

Commit

Permalink
Merge pull request #23 from tokiroto/android-init-view-imagesource
Browse files Browse the repository at this point in the history
Fix for setting source as android ImageSource
  • Loading branch information
triniwiz authored Feb 23, 2020
2 parents 742f614 + dcdfa99 commit f2520f3
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/image-zoom.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,7 @@ export class ImageZoom extends ImageZoomBase {
);
if (this.src) {
const image = this.getImage(this.src);
if (this.src.startsWith('res://')) {
if (+image > 0) {
this.builder = this.picasso.load(image);
}
} else {
this.builder = this.picasso.load(image);
}
this.builder = this.picasso.load(image);
}
if (this.stretch) {
this.resetImage();
Expand Down Expand Up @@ -147,13 +141,7 @@ export class ImageZoom extends ImageZoomBase {
[srcProperty.setNative](src: any) {
if (!this.builder) {
const image = this.getImage(src);
if (types.isString(src) && this.src.startsWith('res://')) {
if (+image > 0) {
this.builder = this.picasso.load(image);
}
} else {
this.builder = this.picasso.load(image);
}
this.builder = this.picasso.load(image);
}
if (this.stretch) {
this.resetImage();
Expand Down

0 comments on commit f2520f3

Please sign in to comment.