chore: added reanimated rc3 patch

This commit is contained in:
Mo Gorhom
2021-02-08 21:51:22 +01:00
parent d8e90b121c
commit aea1bdf348
2 changed files with 20 additions and 1 deletions

View File

@@ -529,4 +529,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 63aff8b91a0d96d498f873a85ecd834b60be6eaf
COCOAPODS: 1.9.1
COCOAPODS: 1.10.1

View File

@@ -0,0 +1,19 @@
diff --git a/node_modules/react-native-reanimated/ios/native/NativeMethods.mm b/node_modules/react-native-reanimated/ios/native/NativeMethods.mm
index 58f1e20..505dd43 100644
--- a/node_modules/react-native-reanimated/ios/native/NativeMethods.mm
+++ b/node_modules/react-native-reanimated/ios/native/NativeMethods.mm
@@ -37,14 +37,10 @@
}
-NSString *eventDispatcherKey = @"eventDispatcher";
void scrollTo(int scrollViewTag, RCTUIManager *uiManager, double x, double y, bool animated) {
UIView *view = [uiManager viewForReactTag:@(scrollViewTag)];
RCTScrollView *scrollView = (RCTScrollView *) view;
- RCTEventDispatcher* oldEventDispatcher = [scrollView valueForKey:eventDispatcherKey];
- [scrollView setValue:nil forKey:eventDispatcherKey];
[scrollView scrollToOffset:(CGPoint){(CGFloat)x, (CGFloat)y} animated:animated];
- [scrollView setValue:oldEventDispatcher forKey:eventDispatcherKey];
}
}