mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Expose getEventDispatcher() method into UIManager interface
Summary: This diff promotes the UIManagerModule.getEventDispatcher() to the interface UIManager and it implements this method in FabricUIManager class. Changelog: [internal] Reviewed By: JoshuaGross Differential Revision: D18862862 fbshipit-source-id: 424f0e601ed1807dbd5d33048daf7dc3bb200dcd
This commit is contained in:
committed by
Facebook Github Bot
parent
c0eddad17b
commit
bc11e9c7f1
@@ -56,6 +56,9 @@ public interface UIManager extends JSIModule, PerformanceCounter {
|
||||
*/
|
||||
void dispatchCommand(int reactTag, String commandId, @Nullable ReadableArray commandArgs);
|
||||
|
||||
/** @return the {@link EventDispatcher} object that is used by this class. */
|
||||
<T> T getEventDispatcher();
|
||||
|
||||
/**
|
||||
* Used by native animated module to bypass the process of updating the values through the shadow
|
||||
* view hierarchy. This method will directly update native views, which means that updates for
|
||||
|
||||
@@ -693,6 +693,13 @@ public class FabricUIManager implements UIManager, LifecycleEventListener {
|
||||
.postFrameCallback(ReactChoreographer.CallbackType.DISPATCH_UI, mDispatchUIFrameCallback);
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
@SuppressWarnings("unchecked")
|
||||
public EventDispatcher getEventDispatcher() {
|
||||
return mEventDispatcher;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHostPause() {
|
||||
ReactChoreographer.getInstance()
|
||||
|
||||
Reference in New Issue
Block a user