Introduce "updateProps" field InsertMutation

Summary: This diff introduces the concept of "updateProps" as part of InsertMutation and it changes the diffing algorithm to populate this field.

Reviewed By: shergin

Differential Revision: D14289608

fbshipit-source-id: 642f00d03d294a12ea7fa7482c72e701b756f3d4
This commit is contained in:
David Vacca
2019-03-03 08:55:25 -08:00
committed by Facebook Github Bot
parent f6ba52bf1e
commit 95c414cfbf
2 changed files with 5 additions and 3 deletions

View File

@@ -402,8 +402,10 @@ void Binding::schedulerDidFinishTransaction(
mountItems[position++] =
createInsertMountItem(javaUIManager_, mutation);
mountItems[position++] =
createUpdatePropsMountItem(javaUIManager_, mutation);
if (mutation.newChildShadowView.props->revision != 0) {
mountItems[position++] =
createUpdatePropsMountItem(javaUIManager_, mutation);
}
auto updateLayoutMountItem =
createUpdateLayoutMountItem(javaUIManager_, mutation);

View File

@@ -116,7 +116,7 @@ static void calculateShadowViewMutations(
const auto &newChildPair = newChildPairs[index];
insertMutations.push_back(ShadowViewMutation::InsertMutation(
parentShadowView, newChildPair.shadowView, index));
parentShadowView, newChildPair.shadowView, index));
insertedPairs.insert({newChildPair.shadowView.tag, newChildPair});
}