Skip to content

Commit c0ac0d5

Browse files
olinotteghemFacebook Github Bot 9
authored andcommitted
Fix missing check causing layout some animation code to be executed when it shouldn't
Reviewed By: dmmiller Differential Revision: D3404149 fbshipit-source-id: 8663325fd3a4b9257d84075e22bd9cc59d6414ac
1 parent c810160 commit c0ac0d5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,8 @@ public void manageChildren(
348348

349349
View viewToRemove = viewManager.getChildAt(viewToManage, indexToRemove);
350350

351-
if (mLayoutAnimator.shouldAnimateLayout(viewToRemove) &&
351+
if (mLayoutAnimationEnabled &&
352+
mLayoutAnimator.shouldAnimateLayout(viewToRemove) &&
352353
arrayContains(tagsToDelete, viewToRemove.getId())) {
353354
// The view will be removed and dropped by the 'delete' layout animation
354355
// instead, so do nothing
@@ -395,7 +396,8 @@ public void manageChildren(
395396
tagsToDelete));
396397
}
397398

398-
if (mLayoutAnimator.shouldAnimateLayout(viewToDestroy)) {
399+
if (mLayoutAnimationEnabled &&
400+
mLayoutAnimator.shouldAnimateLayout(viewToDestroy)) {
399401
mLayoutAnimator.deleteView(viewToDestroy, new LayoutAnimationListener() {
400402
@Override
401403
public void onAnimationEnd() {

0 commit comments

Comments
 (0)