Delay dropping root views until the drop views step of StateBuilder.

Summary: @public Make UIOperation public so that custom implementations can expose instances of it.

Reviewed By: ahmedre

Differential Revision: D3618197
This commit is contained in:
Seth Kirby
2016-07-28 16:44:13 -07:00
committed by Ahmed El-Helw
parent 45e626a887
commit 1d034cf91d
4 changed files with 27 additions and 25 deletions

View File

@@ -140,7 +140,12 @@ import com.facebook.react.uimanager.ViewManagerRegistry;
/* package */ void dropViews(int[] viewsToDrop) {
for (int viewToDrop : viewsToDrop) {
dropView(resolveView(viewToDrop));
if (viewToDrop > 0) {
dropView(resolveView(viewToDrop));
} else {
// Root views are noted with a negative tag from StateBuilder.
removeRootView(-viewToDrop);
}
}
}