Fixed bug when updaing props for RCTNetworkImageView

This commit is contained in:
Nick Lockwood 2015-08-11 04:15:11 -07:00
parent 51ccdfa36a
commit 68f1a223fb

View File

@ -765,12 +765,11 @@ RCT_EXPORT_METHOD(createView:(nonnull NSNumber *)reactTag
} }
RCT_EXPORT_METHOD(updateView:(nonnull NSNumber *)reactTag RCT_EXPORT_METHOD(updateView:(nonnull NSNumber *)reactTag
viewName:(NSString *)viewName viewName:(__unused NSString *)viewName // not reliable, do not use
props:(NSDictionary *)props) props:(NSDictionary *)props)
{ {
RCTComponentData *componentData = _componentDataByName[viewName];
RCTShadowView *shadowView = _shadowViewRegistry[reactTag]; RCTShadowView *shadowView = _shadowViewRegistry[reactTag];
RCTComponentData *componentData = _componentDataByName[shadowView.viewName];
[componentData setProps:props forShadowView:shadowView]; [componentData setProps:props forShadowView:shadowView];
[self addUIBlock:^(__unused RCTUIManager *uiManager, RCTSparseArray *viewRegistry) { [self addUIBlock:^(__unused RCTUIManager *uiManager, RCTSparseArray *viewRegistry) {