Skip to content

Commit

Permalink
Fix for setting source as android ImageSource
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislavb committed Sep 12, 2019
1 parent 742f614 commit dcdfa99
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 dcdfa99

Please sign in to comment.