Merge pull request #2428 from NativeScript/atanasovg/image-cache-update

Reflects some refactoring in the widgest for Android.
This commit is contained in:
Vasil Chimev
2016-07-11 03:20:28 -07:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

@@ -62,7 +62,9 @@ declare module org {
onComplete(result: Object, context: Object): void;
}
export function DownloadImage(url: string, callback: CompleteCallback, context: any);
export module Image {
export function download(url: string, callback: CompleteCallback, context: any);
}
export module Http {
export class KeyValuePair {

View File

@@ -52,7 +52,7 @@ export class Cache extends common.Cache {
}
public _downloadCore(request: common.DownloadRequest) {
org.nativescript.widgets.Async.DownloadImage(request.url, this._callback, request.key);
org.nativescript.widgets.Async.Image.download(request.url, this._callback, request.key);
}
public get(key: string): any {