Skip to content

Commit d69ce7e

Browse files
sammy-SCfacebook-github-bot
authored andcommitted
implement SchedulerDelegateProxy::schedulerShouldSynchronouslyUpdateViewOnUIThread (#51334)
Summary: Pull Request resolved: #51334 changelog: [internal] Implement schedulerShouldSynchronouslyUpdateViewOnUIThread for C++ Native Animated. This simply passes along the data. Reviewed By: zeyap Differential Revision: D74739294
1 parent 63a5a70 commit d69ce7e

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

packages/react-native/React/Fabric/RCTScheduler.h

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ NS_ASSUME_NONNULL_BEGIN
4242
blockNativeResponder:(BOOL)blockNativeResponder
4343
forShadowView:(const facebook::react::ShadowView &)shadowView;
4444

45+
- (void)schedulerDidSynchronouslyUpdateViewOnUIThread:(facebook::react::Tag)reactTag props:(folly::dynamic)props;
4546
@end
4647

4748
/**

packages/react-native/React/Fabric/RCTScheduler.mm

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ void schedulerDidSendAccessibilityEvent(const ShadowView &shadowView, const std:
6868

6969
void schedulerShouldSynchronouslyUpdateViewOnUIThread(facebook::react::Tag tag, const folly::dynamic &props) override
7070
{
71-
// Does nothing.
72-
// This delegate method is not currently used on iOS.
71+
RCTScheduler *scheduler = (__bridge RCTScheduler *)scheduler_;
72+
[scheduler.delegate schedulerDidSynchronouslyUpdateViewOnUIThread:tag props:props];
7373
}
7474

7575
private:

packages/react-native/React/Fabric/RCTSurfacePresenter.h

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ NS_ASSUME_NONNULL_BEGIN
6666
- (nullable RCTFabricSurface *)surfaceForRootTag:(ReactTag)rootTag;
6767

6868
- (void)synchronouslyUpdateViewOnUIThread:(ReactTag)reactTag props:(folly::dynamic)props;
69+
- (void)schedulerDidSynchronouslyUpdateViewOnUIThread:(ReactTag)reactTag props:(folly::dynamic)props;
6970

7071
- (void)setupAnimationDriverWithSurfaceHandler:(const facebook::react::SurfaceHandler &)surfaceHandler;
7172

packages/react-native/React/Fabric/RCTSurfacePresenter.mm

+5
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ - (UIView *)findComponentViewWithTag_DO_NOT_USE_DEPRECATED:(NSInteger)tag
148148
return componentView;
149149
}
150150

151+
- (void)schedulerDidSynchronouslyUpdateViewOnUIThread:(ReactTag)reactTag props:(folly::dynamic)props
152+
{
153+
[self synchronouslyUpdateViewOnUIThread:reactTag props:std::move(props)];
154+
}
155+
151156
- (void)synchronouslyUpdateViewOnUIThread:(ReactTag)reactTag props:(folly::dynamic)props
152157
{
153158
RCTScheduler *scheduler = [self scheduler];

0 commit comments

Comments
 (0)