Skip to content

Commit f901b47

Browse files
sammy-SCfacebook-github-bot
authored andcommitted
implement SchedulerDelegateProxy::schedulerShouldSynchronouslyUpdateViewOnUIThread
Differential Revision: D74739294
1 parent b85272e commit f901b47

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ void schedulerDidSendAccessibilityEvent(const ShadowView &shadowView, const std:
7070

7171
void schedulerShouldSynchronouslyUpdateViewOnUIThread(facebook::react::Tag tag, const folly::dynamic &props) override
7272
{
73-
// Does nothing.
74-
// This delegate method is not currently used on iOS.
73+
RCTScheduler *scheduler = (__bridge RCTScheduler *)scheduler_;
74+
[scheduler.delegate schedulerDidSynchronouslyUpdateViewOnUIThread:tag props:props];
7575
}
7676

7777
private:

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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 5 additions & 0 deletions
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)