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 коммит произвёл Facebook Github Bot
Родитель f6ba52bf1e
Коммит 95c414cfbf
2 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -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);

Просмотреть файл

@ -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});
}