Skip to content

Commit 7d01b81

Browse files
committed
Get rid of old view tags set
1 parent 93f537f commit 7d01b81

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

packages/react-native-reanimated/Common/cpp/reanimated/Fabric/updates/AnimatedPropsRegistry.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,15 @@ void AnimatedPropsRegistry::remove(const Tag tag) {
3434

3535
jsi::Value AnimatedPropsRegistry::getUpdatesOlderThanTimestamp(jsi::Runtime &rt, const double timestamp) {
3636
std::unordered_map<Tag, folly::dynamic> updatesMap;
37-
3837
{
3938
auto lock1 = lock();
4039

41-
std::set<Tag> viewTags;
42-
for (const auto &[viewTag, viewTimestamp] : timestampMap_) {
43-
if (viewTimestamp < timestamp) {
44-
viewTags.insert(viewTag);
45-
}
46-
}
47-
4840
for (const auto &[tag, pair] : updatesRegistry_) {
4941
const auto &[shadowNode, props] = pair;
5042
const auto viewTag = shadowNode->getTag();
51-
if (!viewTags.contains(viewTag)) {
43+
44+
const auto viewTimestamp = timestampMap_.at(viewTag);
45+
if (viewTimestamp >= timestamp) {
5246
continue;
5347
}
5448

0 commit comments

Comments
 (0)