| 
8 | 8 | #import <React/RCTMountingManager.h>  | 
9 | 9 | #import <React/RCTUtils.h>  | 
10 | 10 | 
 
  | 
 | 11 | +#if REACT_NATIVE_MINOR_VERSION < 81  | 
 | 12 | +#import <React/RCTFollyConvert.h>  | 
 | 13 | +#endif  | 
 | 14 | + | 
 | 15 | +using namespace facebook::react;  | 
 | 16 | + | 
11 | 17 | @implementation REANodesManager {  | 
12 | 18 |   READisplayLink *_displayLink;  | 
13 | 19 |   NSMutableArray<REAOnAnimationCallback> *_onAnimationCallbacks;  | 
@@ -157,19 +163,22 @@ - (void)maybeFlushUIUpdatesQueue  | 
157 | 163 | 
 
  | 
158 | 164 | - (void)synchronouslyUpdateUIProps:(ReactTag)viewTag props:(const folly::dynamic &)props  | 
159 | 165 | {  | 
160 |  | -#if !TARGET_OS_OSX  | 
161 | 166 |   RCTAssertMainQueue();  | 
162 | 167 | 
 
  | 
163 | 168 |   RCTSurfacePresenter *surfacePresenter = self.surfacePresenter;  | 
164 | 169 |   RCTComponentViewRegistry *componentViewRegistry = surfacePresenter.mountingManager.componentViewRegistry;  | 
165 |  | -  UIView<RCTComponentViewProtocol> *componentView = [componentViewRegistry findComponentViewWithTag:viewTag];  | 
 | 170 | +  REAUIView<RCTComponentViewProtocol> *componentView =  | 
 | 171 | +      [componentViewRegistry findComponentViewWithTag:static_cast<Tag>(viewTag)];  | 
166 | 172 |   NSSet<NSString *> *propKeysManagedByAnimated = [componentView propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN];  | 
 | 173 | +#if REACT_NATIVE_MINOR_VERSION >= 81  | 
167 | 174 |   [surfacePresenter schedulerDidSynchronouslyUpdateViewOnUIThread:viewTag props:props];  | 
 | 175 | +#else  | 
 | 176 | +  [surfacePresenter synchronouslyUpdateViewOnUIThread:@(viewTag) props:convertFollyDynamicToId(props)];  | 
 | 177 | +#endif  | 
168 | 178 |   [componentView setPropKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN:propKeysManagedByAnimated];  | 
169 | 179 |   // `synchronouslyUpdateViewOnUIThread` does not flush props like `backgroundColor` etc.  | 
170 | 180 |   // so that's why we need to call `finalizeUpdates` here.  | 
171 | 181 |   [componentView finalizeUpdates:RNComponentViewUpdateMask{}];  | 
172 |  | -#endif // !TARGET_OS_OSX  | 
173 | 182 | }  | 
174 | 183 | 
 
  | 
175 | 184 | @end  | 
0 commit comments