Skip to content

Commit

Permalink
[Discord] Moving registry of RCTEventEmitter to constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Flewp committed Apr 10, 2024
1 parent 6b6ce86 commit 4667a6b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ public UIManagerModule(
minTimeLeftInFrameForNonBatchedOperationMs);

reactContext.addLifecycleEventListener(this);
mEventDispatcher.registerEventEmitter(
DEFAULT, getReactApplicationContext().getJSModule(RCTEventEmitter.class));
}

/**
Expand Down Expand Up @@ -175,8 +177,6 @@ public Map<String, Object> getConstants() {
public void initialize() {
getReactApplicationContext().registerComponentCallbacks(mMemoryTrimCallback);
getReactApplicationContext().registerComponentCallbacks(mViewManagerRegistry);
mEventDispatcher.registerEventEmitter(
DEFAULT, getReactApplicationContext().getJSModule(RCTEventEmitter.class));
}

@Override
Expand Down

0 comments on commit 4667a6b

Please sign in to comment.