Kill ViewManager.updateView
Differential Revision: D2581595 fb-gh-sync-id: cb653360d7f59da7f4326ca08c41f5de64c384c6
This commit is contained in:
parent
5eaa553264
commit
05c9a1f91a
|
@ -37,20 +37,13 @@ public abstract class ViewManager<T extends View, C extends ReactShadowNode> {
|
|||
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 abstract class ViewManager<T extends View, C extends ReactShadowNode> {
|
|||
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 class ReactRawTextManager extends ReactTextViewManager {
|
|||
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) {
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue