Skip to content

Commit

Permalink
Merge branch 'main' into @tomekzaw/react-native-0.77
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekzaw committed Jan 10, 2025
2 parents c9eb1c0 + 3667594 commit e864e7f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ jni::local_ref<JArrayInt> LayoutAnimations::getSharedGroup(const int tag) {
return jGroup;
}

void LayoutAnimations::invalidate() {
javaPart_ = nullptr;
}

void LayoutAnimations::registerNatives() {
registerHybrid({
makeNativeMethod("initHybrid", LayoutAnimations::initHybrid),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ class LayoutAnimations : public jni::HybridClass<LayoutAnimations> {
int findPrecedingViewTagForTransition(int tag);
jni::local_ref<JArrayInt> getSharedGroup(const int tag);

void invalidate();

private:
friend HybridBase;
jni::global_ref<LayoutAnimations::javaobject> javaPart_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,10 @@ void NativeProxy::setupLayoutAnimations() {
}

void NativeProxy::invalidateCpp() {
layoutAnimations_->cthis()->invalidate();

workletsModuleProxy_.reset();

if (reanimatedModuleProxy_ != nullptr) {
reanimatedModuleProxy_->invalidate();
}
Expand Down

0 comments on commit e864e7f

Please sign in to comment.