Fix broken _onAndroidAnimationEnd after back navigation

This commit is contained in:
Panayot Cankov
2017-04-25 14:32:50 +03:00
parent d65f7ec8da
commit 5cc8def8e4

View File

@ -113,13 +113,19 @@ export class Animation extends AnimationBase {
if (traceEnabled()) { if (traceEnabled()) {
traceWrite("MainAnimatorListener.onAnimationEnd(" + animator + ")", traceCategories.Animation); traceWrite("MainAnimatorListener.onAnimationEnd(" + animator + ")", traceCategories.Animation);
} }
that.get()._onAndroidAnimationEnd(); const thisRef = that.get();
if (thisRef) {
thisRef._onAndroidAnimationEnd();
}
}, },
onAnimationCancel: function (animator: android.animation.Animator): void { onAnimationCancel: function (animator: android.animation.Animator): void {
if (traceEnabled()) { if (traceEnabled()) {
traceWrite("MainAnimatorListener.onAnimationCancel(" + animator + ")", traceCategories.Animation); traceWrite("MainAnimatorListener.onAnimationCancel(" + animator + ")", traceCategories.Animation);
} }
that.get()._onAndroidAnimationCancel(); const thisRef = that.get();
if (thisRef) {
thisRef._onAndroidAnimationCancel();
}
} }
}); });
} }