mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 11:34:23 +00:00
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:
parent
19ab84ffb7
commit
aa4428cd13
@ -45,7 +45,7 @@ RCT_EXPORT_MODULE()
|
|||||||
#pragma clang diagnostic push
|
#pragma clang diagnostic push
|
||||||
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
|
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
|
||||||
|
|
||||||
- (NSArray<NSString *> *)customDirectEventTypes
|
- (NSArray<NSString *> *)customBubblingEventTypes
|
||||||
{
|
{
|
||||||
return @[@"foo"];
|
return @[@"foo"];
|
||||||
}
|
}
|
||||||
|
@ -395,17 +395,11 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
|||||||
|
|
||||||
- (NSDictionary<NSString *, id> *)viewConfig
|
- (NSDictionary<NSString *, id> *)viewConfig
|
||||||
{
|
{
|
||||||
|
NSMutableArray<NSString *> *bubblingEvents = [NSMutableArray new];
|
||||||
|
NSMutableArray<NSString *> *directEvents = [NSMutableArray new];
|
||||||
|
|
||||||
#pragma clang diagnostic push
|
#pragma clang diagnostic push
|
||||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
#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))) {
|
if (RCTClassOverridesInstanceMethod(_managerClass, @selector(customBubblingEventTypes))) {
|
||||||
NSArray<NSString *> *events = [self.manager customBubblingEventTypes];
|
NSArray<NSString *> *events = [self.manager customBubblingEventTypes];
|
||||||
for (NSString *event in events) {
|
for (NSString *event in events) {
|
||||||
@ -444,12 +438,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
|||||||
free(methods);
|
free(methods);
|
||||||
|
|
||||||
#if RCT_DEBUG
|
#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) {
|
for (NSString *event in bubblingEvents) {
|
||||||
if ([directEvents containsObject:event]) {
|
if ([directEvents containsObject:event]) {
|
||||||
RCTLogError(@"Component '%@' registered '%@' as both a bubbling event "
|
RCTLogError(@"Component '%@' registered '%@' as both a bubbling event "
|
||||||
|
@ -63,19 +63,6 @@ typedef void (^RCTViewManagerUIBlock)(RCTUIManager *uiManager, NSDictionary<NSNu
|
|||||||
*/
|
*/
|
||||||
- (NSArray<NSString *> *)customBubblingEventTypes __deprecated_msg("Use RCTBubblingEventBlock props instead.");
|
- (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
|
* Called to notify manager that layout has finished, in case any calculated
|
||||||
* properties need to be copied over from shadow view to view.
|
* properties need to be copied over from shadow view to view.
|
||||||
|
@ -86,11 +86,6 @@ RCT_EXPORT_MODULE()
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSArray<NSString *> *)customDirectEventTypes
|
|
||||||
{
|
|
||||||
return @[];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (RCTViewManagerUIBlock)uiBlockToAmendWithShadowView:(__unused RCTShadowView *)shadowView
|
- (RCTViewManagerUIBlock)uiBlockToAmendWithShadowView:(__unused RCTShadowView *)shadowView
|
||||||
{
|
{
|
||||||
return nil;
|
return nil;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user