Fix LayoutAnimations assertion on `adjustDelayedMutationIndicesForMutation`

Summary:
`adjustDelayedMutationIndicesForMutation` asserts that the mutation is either Remove or Insert. At one callsite, we weren't checking the mutation type before calling `adjustDelayedMutationIndicesForMutation`.

Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D23746617

fbshipit-source-id: 6046fec2eb4821094937b1b16f40347bbc55c20e
This commit is contained in:
Joshua Gross 2020-09-17 12:25:46 -07:00 коммит произвёл Facebook GitHub Bot
Родитель e7dbd845e6
Коммит 012ac09fa1
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -1253,7 +1253,10 @@ LayoutAnimationKeyFrameManager::pullTransaction(
<< "Adjust delayed mutations based on finalConflictingMutations";
#endif
for (auto &mutation : finalConflictingMutations) {
adjustDelayedMutationIndicesForMutation(surfaceId, mutation);
if (mutation.type == ShadowViewMutation::Remove ||
mutation.type == ShadowViewMutation::Insert) {
adjustDelayedMutationIndicesForMutation(surfaceId, mutation);
}
}
// Adjust keyframes based on already-delayed, existing animations, before