Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
#import <React/RCTMountingManager.h>
#import <React/RCTUtils.h>

#if REACT_NATIVE_MINOR_VERSION < 81
#import <React/RCTFollyConvert.h>
#endif

using namespace facebook::react;

@implementation REANodesManager {
READisplayLink *_displayLink;
NSMutableArray<REAOnAnimationCallback> *_onAnimationCallbacks;
Expand Down Expand Up @@ -157,19 +163,22 @@ - (void)maybeFlushUIUpdatesQueue

- (void)synchronouslyUpdateUIProps:(ReactTag)viewTag props:(const folly::dynamic &)props
{
#if !TARGET_OS_OSX
RCTAssertMainQueue();

RCTSurfacePresenter *surfacePresenter = self.surfacePresenter;
RCTComponentViewRegistry *componentViewRegistry = surfacePresenter.mountingManager.componentViewRegistry;
UIView<RCTComponentViewProtocol> *componentView = [componentViewRegistry findComponentViewWithTag:viewTag];
REAUIView<RCTComponentViewProtocol> *componentView =
[componentViewRegistry findComponentViewWithTag:static_cast<Tag>(viewTag)];
NSSet<NSString *> *propKeysManagedByAnimated = [componentView propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN];
#if REACT_NATIVE_MINOR_VERSION >= 81
[surfacePresenter schedulerDidSynchronouslyUpdateViewOnUIThread:viewTag props:props];
#else
[surfacePresenter synchronouslyUpdateViewOnUIThread:@(viewTag) props:convertFollyDynamicToId(props)];
#endif
[componentView setPropKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN:propKeysManagedByAnimated];
// `synchronouslyUpdateViewOnUIThread` does not flush props like `backgroundColor` etc.
// so that's why we need to call `finalizeUpdates` here.
[componentView finalizeUpdates:RNComponentViewUpdateMask{}];
#endif // !TARGET_OS_OSX
}

@end
Loading