From 4667a6b581d4e2d3afa04dc87d7c7bbea23c91ca Mon Sep 17 00:00:00 2001 From: Alex Hendrix Date: Wed, 10 Apr 2024 09:01:34 -0500 Subject: [PATCH] [Discord] Moving registry of RCTEventEmitter to constructor --- .../java/com/facebook/react/uimanager/UIManagerModule.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java index a3d3917b77eec3..717660167155cf 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java @@ -148,6 +148,8 @@ public UIManagerModule( minTimeLeftInFrameForNonBatchedOperationMs); reactContext.addLifecycleEventListener(this); + mEventDispatcher.registerEventEmitter( + DEFAULT, getReactApplicationContext().getJSModule(RCTEventEmitter.class)); } /** @@ -175,8 +177,6 @@ public Map getConstants() { public void initialize() { getReactApplicationContext().registerComponentCallbacks(mMemoryTrimCallback); getReactApplicationContext().registerComponentCallbacks(mViewManagerRegistry); - mEventDispatcher.registerEventEmitter( - DEFAULT, getReactApplicationContext().getJSModule(RCTEventEmitter.class)); } @Override