mirror of https://github.com/espruino/BangleApps
imageclock - Directly set cached resource
parent
ad88625b8c
commit
866155bbd0
|
@ -292,14 +292,7 @@ let firstDraw = true;
|
||||||
if (resource){
|
if (resource){
|
||||||
prepareImg(resource);
|
prepareImg(resource);
|
||||||
//print("lastElem", typeof resource)
|
//print("lastElem", typeof resource)
|
||||||
if (resource) {
|
|
||||||
element.cachedImage[cacheKey] = resource;
|
element.cachedImage[cacheKey] = resource;
|
||||||
//print("cache res ",typeof element.cachedImage[cacheKey]);
|
|
||||||
} else {
|
|
||||||
element.cachedImage[cacheKey] = null;
|
|
||||||
//print("cache null",typeof element.cachedImage[cacheKey]);
|
|
||||||
//print("Could not create image from", resource);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
//print("Could not get resource from", element, lastElem);
|
//print("Could not get resource from", element, lastElem);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue