-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fabric Interop - Properly dispatch integer commands #38527
Conversation
This pull request was exported from Phabricator. Differential Revision: D47600094 |
This pull request was exported from Phabricator. Differential Revision: D47600094 |
Summary: Pull Request resolved: facebook#38527 This fixes a bug that got reported for the Fabric Interop for Android with Command dispatching. (See terrylinla/react-native-sketch-canvas#236) The problem is that libraries that were receiving commands as ints with: ``` public void receiveCommand( int surfaceId, int reactTag, int commandId, Nullable ReadableArray commandArgs) { ``` would not receive command with the Fabric Interop for Android. The problem is that with Fabric, events are dispatched as string always. cipolleschi took care of this for iOS, but we realized that the Android part was missing. I'm adding it here. The logic is, if the event is dispatched as a string that represents a number (say `"42"`) and the user has Fabric Interop enabled, then we dispatch the event as `int` (so libraries will keep on working). Changelog: [Android] [Fixed] - Fabric Interop - Properly dispatch integer commands Reviewed By: cipolleschi Differential Revision: D47600094 fbshipit-source-id: 73fd3f5bdee860f1d371541b3bd0aa60a62e2981
8d0684a
to
f445acf
Compare
Base commit: f6197cd |
This pull request was exported from Phabricator. Differential Revision: D47600094 |
f445acf
to
c83792c
Compare
Summary: Pull Request resolved: facebook#38527 This fixes a bug that got reported for the Fabric Interop for Android with Command dispatching. (See terrylinla/react-native-sketch-canvas#236) The problem is that libraries that were receiving commands as ints with: ``` public void receiveCommand( int surfaceId, int reactTag, int commandId, Nullable ReadableArray commandArgs) { ``` would not receive command with the Fabric Interop for Android. The problem is that with Fabric, events are dispatched as string always. cipolleschi took care of this for iOS, but we realized that the Android part was missing. I'm adding it here. The logic is, if the event is dispatched as a string that represents a number (say `"42"`) and the user has Fabric Interop enabled, then we dispatch the event as `int` (so libraries will keep on working). Changelog: [Android] [Fixed] - Fabric Interop - Properly dispatch integer commands Reviewed By: cipolleschi Differential Revision: D47600094 fbshipit-source-id: ee4b4829610c42304bcbf50bd27d2b4093dae760
Summary: Pull Request resolved: facebook#38527 This fixes a bug that got reported for the Fabric Interop for Android with Command dispatching. (See terrylinla/react-native-sketch-canvas#236) The problem is that libraries that were receiving commands as ints with: ``` public void receiveCommand( int surfaceId, int reactTag, int commandId, Nullable ReadableArray commandArgs) { ``` would not receive command with the Fabric Interop for Android. The problem is that with Fabric, events are dispatched as string always. cipolleschi took care of this for iOS, but we realized that the Android part was missing. I'm adding it here. The logic is, if the event is dispatched as a string that represents a number (say `"42"`) and the user has Fabric Interop enabled, then we dispatch the event as `int` (so libraries will keep on working). Changelog: [Android] [Fixed] - Fabric Interop - Properly dispatch integer commands Reviewed By: cipolleschi Differential Revision: D47600094 fbshipit-source-id: adb789abc529b9b1aa0dfcf979ac16856a31135d
c83792c
to
039a69a
Compare
This pull request was exported from Phabricator. Differential Revision: D47600094 |
This pull request was successfully merged by @cortinico in ccc50dd. When will my fix make it into a release? | Upcoming Releases |
Summary: Pull Request resolved: #38527 This fixes a bug that got reported for the Fabric Interop for Android with Command dispatching. (See terrylinla/react-native-sketch-canvas#236) The problem is that libraries that were receiving commands as ints with: ``` public void receiveCommand( int surfaceId, int reactTag, int commandId, Nullable ReadableArray commandArgs) { ``` would not receive command with the Fabric Interop for Android. The problem is that with Fabric, events are dispatched as string always. cipolleschi took care of this for iOS, but we realized that the Android part was missing. I'm adding it here. The logic is, if the event is dispatched as a string that represents a number (say `"42"`) and the user has Fabric Interop enabled, then we dispatch the event as `int` (so libraries will keep on working). Changelog: [Android] [Fixed] - Fabric Interop - Properly dispatch integer commands Reviewed By: cipolleschi Differential Revision: D47600094 fbshipit-source-id: c35f0509e6c6c0cddc7090a069882f92dd95532e
Summary:
This fixes a bug that got reported for the Fabric Interop for Android with Command dispatching.
(See terrylinla/react-native-sketch-canvas#236)
The problem is that libraries that were receiving commands as ints with:
would not receive command with the Fabric Interop for Android.
The problem is that with Fabric, events are dispatched as string always.
cipolleschi took care of this for iOS, but we realized that the Android part was missing. I'm adding it here.
The logic is, if the event is dispatched as a string that represents a number (say
"42"
) and the user has Fabric Interop enabled, then we dispatch the event asint
(so libraries will keep on working).Changelog:
[Android] [Fixed] - Fabric Interop - Properly dispatch integer commands
Differential Revision: D47600094