mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Deprecate receiveCommand method for INT commands
Summary:
This diff deprecates:
```
public void receiveCommand(int reactTag, int commandId, Nullable ReadableArray commandArgs) {
```
in favor of:
```
public void receiveCommand(int reactTag, String commandId, Nullable ReadableArray commandArgs) {
```
Reviewed By: JoshuaGross, TheSavior
Differential Revision: D16019254
fbshipit-source-id: 61efefe5d5c43f9b24b729f17229725b87b60a1f
This commit is contained in:
committed by
Facebook Github Bot
parent
9c20f8ae4d
commit
6eec39313d
@@ -480,6 +480,7 @@ public class FabricUIManager implements UIManager, LifecycleEventListener {
|
||||
@Override
|
||||
public void onHostDestroy() {}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public void dispatchCommand(
|
||||
final int reactTag, final int commandId, @Nullable final ReadableArray commandArgs) {
|
||||
|
||||
@@ -134,6 +134,7 @@ public class MountingManager {
|
||||
return viewState;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void receiveCommand(int reactTag, int commandId, @Nullable ReadableArray commandArgs) {
|
||||
ViewState viewState = getViewState(reactTag);
|
||||
|
||||
|
||||
+1
@@ -737,6 +737,7 @@ public class NativeViewHierarchyManager {
|
||||
mLayoutAnimator.reset();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public synchronized void dispatchCommand(
|
||||
int reactTag, int commandId, @Nullable ReadableArray args) {
|
||||
UiThreadUtil.assertOnUiThread();
|
||||
|
||||
@@ -689,6 +689,7 @@ public class UIImplementation {
|
||||
mOperationsQueue.enqueueClearJSResponder();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void dispatchViewManagerCommand(
|
||||
int reactTag, int commandId, @Nullable ReadableArray commandArgs) {
|
||||
assertViewExists(reactTag, "dispatchViewManagerCommand");
|
||||
|
||||
@@ -659,6 +659,8 @@ public class UIManagerModule extends ReactContextBaseJavaModule
|
||||
}
|
||||
}
|
||||
|
||||
/** Deprecated, use {@link #dispatchCommand(int, String, ReadableArray)} instead. */
|
||||
@Deprecated
|
||||
@Override
|
||||
public void dispatchCommand(int reactTag, int commandId, @Nullable ReadableArray commandArgs) {
|
||||
mUIImplementation.dispatchViewManagerCommand(reactTag, commandId, commandArgs);
|
||||
|
||||
@@ -261,6 +261,7 @@ public class UIViewOperationQueue {
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
private final class DispatchCommandOperation extends ViewOperation {
|
||||
|
||||
private final int mCommand;
|
||||
@@ -613,6 +614,7 @@ public class UIViewOperationQueue {
|
||||
mOperations.add(new ChangeJSResponderOperation(0, 0, true /*clearResponder*/, false));
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void enqueueDispatchCommand(
|
||||
int reactTag, int commandId, @Nullable ReadableArray commandArgs) {
|
||||
mOperations.add(new DispatchCommandOperation(reactTag, commandId, commandArgs));
|
||||
|
||||
@@ -159,10 +159,13 @@ public abstract class ViewManager<T extends View, C extends ReactShadowNode>
|
||||
* UIManager}. Good example of such a command would be {@code scrollTo} request with coordinates
|
||||
* for a {@link ScrollView} instance.
|
||||
*
|
||||
* <p>This method is deprecated use {@link #receiveCommand(View, String, ReadableArray)} instead.
|
||||
*
|
||||
* @param root View instance that should receive the command
|
||||
* @param commandId code of the command
|
||||
* @param args optional arguments for the command
|
||||
*/
|
||||
@Deprecated
|
||||
public void receiveCommand(@Nonnull T root, int commandId, @Nullable ReadableArray args) {}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user