Rename CKComponentDataSourceAttachController to CKComponentAttachController
Summary: `CKComponentDataSourceAttachContrlller` doesn't have to be tied with datasource. It's totally legit to use it in hosting view as well. Renaming it to `CKComponentAttachController` and move it to `Core` folder. Reviewed By: priteshrnandgaonkar Differential Revision: D14526150 fbshipit-source-id: f48a8d27a3bfa5170e22a397fe1b32e806bc3c55
This commit is contained in:
committed by
Facebook Github Bot
parent
3b53aff55c
commit
deef14d3a2
@@ -9,8 +9,14 @@
|
|||||||
|
|
||||||
#import "SKComponentHostingViewDescriptor.h"
|
#import "SKComponentHostingViewDescriptor.h"
|
||||||
|
|
||||||
|
// TODO T41966103 Remove conditional imports
|
||||||
|
#if FLIPPER_OSS
|
||||||
#import <ComponentKit/CKComponentDataSourceAttachController.h>
|
#import <ComponentKit/CKComponentDataSourceAttachController.h>
|
||||||
#import <ComponentKit/CKComponentDataSourceAttachControllerInternal.h>
|
#import <ComponentKit/CKComponentDataSourceAttachControllerInternal.h>
|
||||||
|
#else
|
||||||
|
#import <ComponentKit/CKComponentAttachController.h>
|
||||||
|
#import <ComponentKit/CKComponentAttachControllerInternal.h>
|
||||||
|
#endif
|
||||||
#import <ComponentKit/CKComponentHostingView.h>
|
#import <ComponentKit/CKComponentHostingView.h>
|
||||||
#import <ComponentKit/CKComponentHostingViewInternal.h>
|
#import <ComponentKit/CKComponentHostingViewInternal.h>
|
||||||
#import <ComponentKit/CKComponentLayout.h>
|
#import <ComponentKit/CKComponentLayout.h>
|
||||||
|
|||||||
@@ -11,8 +11,14 @@
|
|||||||
|
|
||||||
#import <ComponentKit/CKComponent.h>
|
#import <ComponentKit/CKComponent.h>
|
||||||
#import <ComponentKit/CKComponentRootView.h>
|
#import <ComponentKit/CKComponentRootView.h>
|
||||||
|
// TODO T41966103 Remove conditional imports
|
||||||
|
#if FLIPPER_OSS
|
||||||
#import <ComponentKit/CKComponentDataSourceAttachController.h>
|
#import <ComponentKit/CKComponentDataSourceAttachController.h>
|
||||||
#import <ComponentKit/CKComponentDataSourceAttachControllerInternal.h>
|
#import <ComponentKit/CKComponentDataSourceAttachControllerInternal.h>
|
||||||
|
#else
|
||||||
|
#import <ComponentKit/CKComponentAttachController.h>
|
||||||
|
#import <ComponentKit/CKComponentAttachControllerInternal.h>
|
||||||
|
#endif
|
||||||
#import <ComponentKit/CKInspectableView.h>
|
#import <ComponentKit/CKInspectableView.h>
|
||||||
|
|
||||||
static char const kLayoutWrapperKey = ' ';
|
static char const kLayoutWrapperKey = ' ';
|
||||||
|
|||||||
@@ -9,8 +9,14 @@
|
|||||||
|
|
||||||
#import "SKComponentRootViewDescriptor.h"
|
#import "SKComponentRootViewDescriptor.h"
|
||||||
|
|
||||||
|
// TODO T41966103 Remove conditional imports
|
||||||
|
#if FLIPPER_OSS
|
||||||
#import <ComponentKit/CKComponentDataSourceAttachController.h>
|
#import <ComponentKit/CKComponentDataSourceAttachController.h>
|
||||||
#import <ComponentKit/CKComponentDataSourceAttachControllerInternal.h>
|
#import <ComponentKit/CKComponentDataSourceAttachControllerInternal.h>
|
||||||
|
#else
|
||||||
|
#import <ComponentKit/CKComponentAttachController.h>
|
||||||
|
#import <ComponentKit/CKComponentAttachControllerInternal.h>
|
||||||
|
#endif
|
||||||
#import <ComponentKit/CKComponentHostingView.h>
|
#import <ComponentKit/CKComponentHostingView.h>
|
||||||
#import <ComponentKit/CKComponentHostingViewInternal.h>
|
#import <ComponentKit/CKComponentHostingViewInternal.h>
|
||||||
#import <ComponentKit/CKComponentLayout.h>
|
#import <ComponentKit/CKComponentLayout.h>
|
||||||
@@ -28,7 +34,7 @@
|
|||||||
|
|
||||||
- (NSUInteger)childCountForNode:(CKComponentRootView *)node {
|
- (NSUInteger)childCountForNode:(CKComponentRootView *)node {
|
||||||
if ([node respondsToSelector:@selector(ck_attachState)]) {
|
if ([node respondsToSelector:@selector(ck_attachState)]) {
|
||||||
CKComponentDataSourceAttachState *state = [node ck_attachState];
|
const auto state = [node ck_attachState];
|
||||||
return state == nil ? 0 : 1;
|
return state == nil ? 0 : 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user