mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +08:00
15 lines
479 B
TypeScript
15 lines
479 B
TypeScript
import common = require("ui/image-cache/image-cache-common");
|
|
import imageSource = require("image-source");
|
|
|
|
module.exports.knownEvents = common.knownEvents;
|
|
|
|
export class Cache extends common.Cache {
|
|
public _downloadCore(request: common.DownloadRequest) {
|
|
// TODO: WeakRef?
|
|
var that = this;
|
|
imageSource.fromUrl(request.url).
|
|
then(function (value) {
|
|
that._onDownloadCompleted(request.key, value);
|
|
});
|
|
}
|
|
} |