From 2d6c39d4c2808b8c649b6cd5cf697568be48a8a6 Mon Sep 17 00:00:00 2001 From: askona Date: Thu, 23 Feb 2017 17:42:48 +0200 Subject: [PATCH] fix for WKWebView 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 --- src/providers/image-loader.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/providers/image-loader.ts b/src/providers/image-loader.ts index a546413..27c628f 100644 --- a/src/providers/image-loader.ts +++ b/src/providers/image-loader.ts @@ -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();