Skip to content

Commit

Permalink
fix(): always use getCachedImagePath to get image path (#25)
Browse files Browse the repository at this point in the history
When image is downloaded, it's path should be retreived depending on - is it WKWebView or not. What is done in getCachedImagePath. But in processQueue method you only return plain path 'file://...', which is not working in WKWebView. This will be fixed with this commit
  • Loading branch information
askona authored and ihadeed committed Mar 18, 2017
1 parent 95aa206 commit 09ed878
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/providers/image-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,10 @@ export class ImageLoader {
if (this.shouldIndex) {
this.addFileToIndex(file).then(this.maintainCacheSize.bind(this));
}

currentItem.resolve(localPath);
done();
this.getCachedImagePath(currentItem.imageUrl).then((localUrl) => {
currentItem.resolve(localUrl);
done();
});
})
.catch((e) => {
currentItem.reject();
Expand Down

0 comments on commit 09ed878

Please sign in to comment.