mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Track animations and flush them
Summary: Changelog: [Internal] Track delete animations and when `manageChildren` is called on a certain view tag, finish all pending deletion animations before manipulating children Reviewed By: JoshuaGross Differential Revision: D20319824 fbshipit-source-id: b594d0e6e9b6fecc5eca2938f284be631494e55c
This commit is contained in:
committed by
Facebook Github Bot
parent
d3b93f7578
commit
dedf9372ca
+3
@@ -363,6 +363,8 @@ public class NativeViewHierarchyManager {
|
||||
@Nullable int[] tagsToDelete) {
|
||||
UiThreadUtil.assertOnUiThread();
|
||||
|
||||
mLayoutAnimator.cancelAnimationsForViewTag(tag);
|
||||
|
||||
final ViewGroup viewToManage = (ViewGroup) mTagsToViews.get(tag);
|
||||
final ViewGroupManager viewManager = (ViewGroupManager) resolveViewManager(tag);
|
||||
if (viewToManage == null) {
|
||||
@@ -445,6 +447,7 @@ public class NativeViewHierarchyManager {
|
||||
|
||||
if (mLayoutAnimationEnabled && mLayoutAnimator.shouldAnimateLayout(viewToDestroy)) {
|
||||
mLayoutAnimator.deleteView(
|
||||
tag,
|
||||
viewToDestroy,
|
||||
new LayoutAnimationListener() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user