FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(android): fix sporadic issue with transition cleanup logic called… · NativeScript/NativeScript@a86d41e · GitHub

Commit a86d41e

Browse files
authored
fix(android): fix sporadic issue with transition cleanup logic called twice (#5805)
1 parent 3bb0f4a commit a86d41e

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎tns-core-modules/ui/frame/fragment.transitions.android.ts‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,14 @@ function addNativeTransitionListener(entry: ExpandedEntry, nativeTransition: and
695695
function transitionOrAnimationCompleted(entry: ExpandedEntry): void {
696696
const frameId = entry.frameId;
697697
const entries = waitingQueue.get(frameId);
698+
// https://github.com/NativeScript/NativeScript/issues/5759
699+
// https://github.com/NativeScript/NativeScript/issues/5780
700+
// transitionOrAnimationCompleted fires again (probably bug in android)
701+
// NOTE: we cannot reproduce this issue so this is a blind fix
702+
if (!entries) {
703+
return;
704+
}
705+
698706
entries.delete(entry);
699707
if (entries.size === 0) {
700708
const frame = entry.resolvedPage.frame;
@@ -707,7 +715,7 @@ function transitionOrAnimationCompleted(entry: ExpandedEntry): void {
707715
let current = frame.isCurrent(entry) ? previousCompletedAnimationEntry : entry;
708716
current = current || entry;
709717
// Will be null if Frame is shown modally...
710-
// AnimationCompleted fires again (probably bug in android).
718+
// transitionOrAnimationCompleted fires again (probably bug in android).
711719
if (current) {
712720
const isBack = frame._isBack;
713721
setTimeout(() => frame.setCurrent(current, isBack));

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL