Remove customDirectEventTypes

Summary: This method has been deprecated for a while and there are no internal use-cases left (customBubblingEventTypes is still used by RCTViewManager though).

Reviewed By: fkgozali

Differential Revision: D4083327

fbshipit-source-id: 261e0dce3b41714d13b46d146f87fc415eb9e817
This commit is contained in:
Pieter De Baets 2016-10-27 06:54:28 -07:00 committed by Facebook Github Bot
parent 19ab84ffb7
commit aa4428cd13
4 changed files with 4 additions and 34 deletions

View File

@ -45,7 +45,7 @@ RCT_EXPORT_MODULE()
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (NSArray<NSString *> *)customDirectEventTypes
- (NSArray<NSString *> *)customBubblingEventTypes
{
return @[@"foo"];
}

View File

@ -395,17 +395,11 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
- (NSDictionary<NSString *, id> *)viewConfig
{
NSMutableArray<NSString *> *bubblingEvents = [NSMutableArray new];
NSMutableArray<NSString *> *directEvents = [NSMutableArray new];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
NSMutableArray<NSString *> *directEvents = [NSMutableArray new];
if (RCTClassOverridesInstanceMethod(_managerClass, @selector(customDirectEventTypes))) {
NSArray<NSString *> *events = [self.manager customDirectEventTypes];
for (NSString *event in events) {
[directEvents addObject:RCTNormalizeInputEventName(event)];
}
}
NSMutableArray<NSString *> *bubblingEvents = [NSMutableArray new];
if (RCTClassOverridesInstanceMethod(_managerClass, @selector(customBubblingEventTypes))) {
NSArray<NSString *> *events = [self.manager customBubblingEventTypes];
for (NSString *event in events) {
@ -444,12 +438,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
free(methods);
#if RCT_DEBUG
for (NSString *event in directEvents) {
if ([bubblingEvents containsObject:event]) {
RCTLogError(@"Component '%@' registered '%@' as both a bubbling event "
"and a direct event", _name, event);
}
}
for (NSString *event in bubblingEvents) {
if ([directEvents containsObject:event]) {
RCTLogError(@"Component '%@' registered '%@' as both a bubbling event "

View File

@ -63,19 +63,6 @@ typedef void (^RCTViewManagerUIBlock)(RCTUIManager *uiManager, NSDictionary<NSNu
*/
- (NSArray<NSString *> *)customBubblingEventTypes __deprecated_msg("Use RCTBubblingEventBlock props instead.");
/**
* DEPRECATED: declare properties of type RCTDirectEventBlock instead
*
* Returns an array of names of events that can be sent by native views. This
* should return non-bubbling, directly-dispatched event types. The event name
* should not include a prefix such as 'on' or 'top', as this will be applied
* as needed.
*
* Note that this method is not inherited when you subclass a view module, and
* you should not call [super customDirectEventTypes] when overriding it.
*/
- (NSArray<NSString *> *)customDirectEventTypes __deprecated_msg("Use RCTDirectEventBlock props instead.");
/**
* Called to notify manager that layout has finished, in case any calculated
* properties need to be copied over from shadow view to view.

View File

@ -86,11 +86,6 @@ RCT_EXPORT_MODULE()
];
}
- (NSArray<NSString *> *)customDirectEventTypes
{
return @[];
}
- (RCTViewManagerUIBlock)uiBlockToAmendWithShadowView:(__unused RCTShadowView *)shadowView
{
return nil;