Gate flushGestureMutations and flushGestureAnimations (#32605)

Normally these are gated by the whole commitGestureOnRoot path but in
the case of an early commit these phases may need to be invoked.
Earlier. Those paths weren't gated which I noticed when I started adding
code to them.
This commit is contained in:
Sebastian Markbåge
2025-03-14 13:16:30 -04:00
committed by GitHub
parent 1b6e3dd985
commit 3e956805e8
+6
View File
@@ -3927,6 +3927,9 @@ function commitGestureOnRoot(
}
function flushGestureMutations(): void {
if (!enableSwipeTransition) {
return;
}
if (pendingEffectsStatus !== PENDING_GESTURE_MUTATION_PHASE) {
return;
}
@@ -3953,6 +3956,9 @@ function flushGestureMutations(): void {
}
function flushGestureAnimations(): void {
if (!enableSwipeTransition) {
return;
}
// If we get canceled before we start we might not have applied
// mutations yet. We need to apply them first.
flushGestureMutations();