Permalink
Browse files

Kill ViewManager.updateView

Differential Revision: D2581595

fb-gh-sync-id: cb653360d7f59da7f4326ca08c41f5de64c384c6
  • Loading branch information...
kmagiera authored and facebook-github-bot-3 committed Oct 26, 2015
1 parent 5eaa553 commit 05c9a1f91aa27bb7a15054868f0189554db0c214
@@ -37,20 +37,13 @@ public final void updateProperties(T viewToUpdate, CatalystStylesDiffMap props)
ViewManagersPropertyCache.getNativePropSettersForViewManagerClass(getClass());
ReadableMap propMap = props.mBackingMap;
ReadableMapKeySetIterator iterator = propMap.keySetIterator();
// TODO(krzysztof): Remove missingSetters code once all views are migrated to @ReactProp
boolean missingSetters = false;
while (iterator.hasNextKey()) {
String key = iterator.nextKey();
ViewManagersPropertyCache.PropSetter setter = propSetters.get(key);
if (setter != null) {
setter.updateViewProp(this, viewToUpdate, props);
} else {
missingSetters = true;
}
}
if (missingSetters) {
updateView(viewToUpdate, props);
}
onAfterUpdateTransaction(viewToUpdate);
}
@@ -114,18 +107,6 @@ public void onDropViewInstance(ThemedReactContext reactContext, T view) {
protected void addEventEmitters(ThemedReactContext reactContext, T view) {
}
/**
* Subclass should use this method to populate native view with updated style properties. In case
* when a certain property is present in {@param props} map but the value is null, this property
* should be reset to the default value
*
* TODO(krzysztof) This method should be replaced by updateShadowNode and removed completely after
* all view managers adapt @ReactProp
*/
@Deprecated
protected void updateView(T root, CatalystStylesDiffMap props) {
}
/**
* Callback that will be triggered after all properties are updated in current update transaction
* (all @ReactProp handlers for properties updated in current transaction have been called). If
@@ -32,11 +32,6 @@ public ReactTextView createViewInstance(ThemedReactContext context) {
throw new IllegalStateException("RKRawText doesn't map into a native view");
}
@Override
public void updateView(ReactTextView view, CatalystStylesDiffMap props) {
throw new IllegalStateException("RKRawText doesn't map into a native view");
}
@Override
public void updateExtraData(ReactTextView view, Object extraData) {
}

0 comments on commit 05c9a1f

Please sign in to comment.