Merge branch 'master' into animate-width-height

This commit is contained in:
Martin Yankov
2019-05-08 08:52:36 +03:00
committed by GitHub
5 changed files with 65 additions and 22 deletions

View File

@@ -91,6 +91,7 @@ export class Button extends ButtonBase {
this._highlightedHandler = this._highlightedHandler || ((args: TouchGestureEventData) => {
switch (args.action) {
case TouchAction.up:
case TouchAction.cancel:
this._goToVisualState("normal");
break;
case TouchAction.down:

View File

@@ -72,7 +72,11 @@ export class Cache extends common.Cache {
.then((response) => {
try {
const image = UIImage.alloc().initWithData(response.content.raw);
this._onDownloadCompleted(request.key, image);
if (image) {
this._onDownloadCompleted(request.key, image);
} else {
this._onDownloadError(request.key, new Error("No result for provided url"));
}
} catch (err) {
this._onDownloadError(request.key, err);
}