Permalink
Browse files

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
  • Loading branch information...
1 parent 19ab84f commit aa4428cd132bb0d0dbc950b66d3b5f2a3c5b9322 @javache javache committed with Facebook Github Bot Oct 27, 2016
@@ -45,7 +45,7 @@ @implementation RCTTestViewManager
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
-- (NSArray<NSString *> *)customDirectEventTypes
+- (NSArray<NSString *> *)customBubblingEventTypes
{
return @[@"foo"];
}
@@ -395,17 +395,11 @@ - (void)setProps:(NSDictionary<NSString *, id> *)props forShadowView:(RCTShadowV
- (NSDictionary<NSString *, id> *)viewConfig
{
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ NSMutableArray<NSString *> *bubblingEvents = [NSMutableArray new];
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];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (RCTClassOverridesInstanceMethod(_managerClass, @selector(customBubblingEventTypes))) {
NSArray<NSString *> *events = [self.manager customBubblingEventTypes];
for (NSString *event in events) {
@@ -444,12 +438,6 @@ - (void)setProps:(NSDictionary<NSString *, id> *)props forShadowView:(RCTShadowV
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 "
@@ -64,19 +64,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.
*/
@@ -86,11 +86,6 @@ - (RCTShadowView *)shadowView
];
}
-- (NSArray<NSString *> *)customDirectEventTypes
-{
- return @[];
-}
-
- (RCTViewManagerUIBlock)uiBlockToAmendWithShadowView:(__unused RCTShadowView *)shadowView
{
return nil;

0 comments on commit aa4428c

Please sign in to comment.