Skip to content

Commit

Permalink
Fix missing check causing layout some animation code to be executed w…
Browse files Browse the repository at this point in the history
…hen it shouldn't

Reviewed By: dmmiller

Differential Revision: D3404149

fbshipit-source-id: 8663325fd3a4b9257d84075e22bd9cc59d6414ac
  • Loading branch information
olinotteghem authored and grabbou committed Jun 20, 2016
1 parent 3716ce7 commit a7a34a1
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ public void manageChildren(

View viewToRemove = viewToManage.getChildAt(indexToRemove);

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

if (mLayoutAnimator.shouldAnimateLayout(viewToDestroy)) {
if (mLayoutAnimationEnabled &&
mLayoutAnimator.shouldAnimateLayout(viewToDestroy)) {
mLayoutAnimator.deleteView(viewToDestroy, new LayoutAnimationListener() {
@Override
public void onAnimationEnd() {
Expand Down

0 comments on commit a7a34a1

Please sign in to comment.