mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Pass through coalesce info to Fabric eventEmitter
Summary: Changelog: [Internal] Reviewed By: JoshuaGross Differential Revision: D30767649 fbshipit-source-id: d5e730850408afd23a4d4964ef7dd3b17fa44a19
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b4ac21152b
commit
f29ad54534
+10
-9
@@ -61,15 +61,10 @@ public class ReactEventEmitter implements RCTModernEventEmitter {
|
||||
|
||||
@Override
|
||||
public void receiveEvent(
|
||||
int surfaceId,
|
||||
int targetTag,
|
||||
String eventName,
|
||||
boolean canCoalesceEvent,
|
||||
int customCoalesceKey,
|
||||
@Nullable WritableMap event) {
|
||||
int surfaceId, int targetTag, String eventName, @Nullable WritableMap event) {
|
||||
// The two additional params here, `canCoalesceEvent` and `customCoalesceKey`, have no
|
||||
// meaning outside of Fabric.
|
||||
receiveEvent(surfaceId, targetTag, eventName, event);
|
||||
receiveEvent(surfaceId, targetTag, eventName, false, 0, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -120,10 +115,16 @@ public class ReactEventEmitter implements RCTModernEventEmitter {
|
||||
|
||||
@Override
|
||||
public void receiveEvent(
|
||||
int surfaceId, int targetReactTag, String eventName, @Nullable WritableMap event) {
|
||||
int surfaceId,
|
||||
int targetReactTag,
|
||||
String eventName,
|
||||
boolean canCoalesceEvent,
|
||||
int customCoalesceKey,
|
||||
@Nullable WritableMap event) {
|
||||
@UIManagerType int uiManagerType = ViewUtil.getUIManagerType(targetReactTag);
|
||||
if (uiManagerType == UIManagerType.FABRIC && mFabricEventEmitter != null) {
|
||||
mFabricEventEmitter.receiveEvent(surfaceId, targetReactTag, eventName, event);
|
||||
mFabricEventEmitter.receiveEvent(
|
||||
surfaceId, targetReactTag, eventName, canCoalesceEvent, customCoalesceKey, event);
|
||||
} else if (uiManagerType == UIManagerType.DEFAULT && getEventEmitter(targetReactTag) != null) {
|
||||
mRCTEventEmitter.receiveEvent(targetReactTag, eventName, event);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user