Clean up RCTEventDispatcher code
Reviewed By: majak Differential Revision: D3175583 fb-gh-sync-id: c751c9dc79edfd9cb6073a2ff5dd743a03334bc4 fbshipit-source-id: c751c9dc79edfd9cb6073a2ff5dd743a03334bc4
This commit is contained in:
parent
f6d9a9097f
commit
feda8ce2ee
|
@ -145,17 +145,6 @@ RCT_EXTERN NSString *RCTBridgeModuleNameForClass(Class bridgeModuleClass);
|
|||
*/
|
||||
@property (nonatomic, weak, readonly) id<RCTBridgeDelegate> delegate;
|
||||
|
||||
/**
|
||||
* The event dispatcher is a wrapper around -enqueueJSCall:args: that provides a
|
||||
* higher-level interface for sending UI events such as touches and text input.
|
||||
*
|
||||
* NOTE: RCTEventDispatcher is now a bridge module, this is implemented as a
|
||||
* category but remains declared in the bridge to avoid breaking changes
|
||||
*
|
||||
* To be moved.
|
||||
*/
|
||||
@property (nonatomic, readonly) RCTEventDispatcher *eventDispatcher;
|
||||
|
||||
/**
|
||||
* The launch options that were used to initialize the bridge.
|
||||
*/
|
||||
|
|
|
@ -209,11 +209,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
|||
return [self.batchedBridge moduleIsInitialized:moduleClass];
|
||||
}
|
||||
|
||||
- (RCTEventDispatcher *)eventDispatcher
|
||||
{
|
||||
return [self moduleForClass:[RCTEventDispatcher class]];
|
||||
}
|
||||
|
||||
- (void)reload
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -103,3 +103,9 @@ RCT_EXTERN NSString *RCTNormalizeInputEventName(NSString *eventName);
|
|||
- (void)sendEvent:(id<RCTEvent>)event;
|
||||
|
||||
@end
|
||||
|
||||
@interface RCTBridge (RCTEventDispatcher)
|
||||
|
||||
- (RCTEventDispatcher *)eventDispatcher;
|
||||
|
||||
@end
|
||||
|
|
|
@ -189,3 +189,12 @@ RCT_EXPORT_MODULE()
|
|||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation RCTBridge (RCTEventDispatcher)
|
||||
|
||||
- (RCTEventDispatcher *)eventDispatcher
|
||||
{
|
||||
return [self moduleForClass:[RCTEventDispatcher class]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue