mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-03 15:24:58 +08:00
Initialize Event Emitter as part of UIManagerModule
Reviewed By: achen1 Differential Revision: D8216184 fbshipit-source-id: 3b188804e2dad2b112f566da49a939eb4338713d
This commit is contained in:
committed by
Facebook Github Bot
parent
0f10e03dd8
commit
6e359c4589
@@ -130,7 +130,7 @@ public class UIManagerModule extends ReactContextBaseJavaModule implements
|
||||
int minTimeLeftInFrameForNonBatchedOperationMs) {
|
||||
super(reactContext);
|
||||
DisplayMetricsHolder.initDisplayMetricsIfNotInitialized(reactContext);
|
||||
mEventDispatcher = reactContext.getEventDispatcher();
|
||||
mEventDispatcher = new EventDispatcher(reactContext);
|
||||
mModuleConstants = createConstants(viewManagerResolver);
|
||||
mCustomDirectEvents = UIManagerModuleConstants.getDirectEventTypeConstants();
|
||||
mUIImplementation =
|
||||
@@ -150,7 +150,7 @@ public class UIManagerModule extends ReactContextBaseJavaModule implements
|
||||
int minTimeLeftInFrameForNonBatchedOperationMs) {
|
||||
super(reactContext);
|
||||
DisplayMetricsHolder.initDisplayMetricsIfNotInitialized(reactContext);
|
||||
mEventDispatcher = reactContext.getEventDispatcher();
|
||||
mEventDispatcher = new EventDispatcher(reactContext);
|
||||
mCustomDirectEvents = MapBuilder.newHashMap();
|
||||
mModuleConstants = createConstants(viewManagersList, null, mCustomDirectEvents);
|
||||
mUIImplementation =
|
||||
@@ -704,10 +704,6 @@ public class UIManagerModule extends ReactContextBaseJavaModule implements
|
||||
mUIImplementation.setViewHierarchyUpdateDebugListener(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is deprecated, use {@link ReactContext#getEventDispatcher()}.
|
||||
*/
|
||||
@Deprecated
|
||||
public EventDispatcher getEventDispatcher() {
|
||||
return mEventDispatcher;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user