From deef14d3a2844d4c2461431421b90ce30ad0a286 Mon Sep 17 00:00:00 2001 From: Kevin Lin Date: Wed, 20 Mar 2019 06:05:32 -0700 Subject: [PATCH] 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 --- .../SKComponentHostingViewDescriptor.mm | 6 ++++++ .../SKComponentLayoutWrapper.mm | 6 ++++++ .../SKComponentRootViewDescriptor.mm | 8 +++++++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentHostingViewDescriptor.mm b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentHostingViewDescriptor.mm index 73fed8d3c..07dd923f1 100644 --- a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentHostingViewDescriptor.mm +++ b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentHostingViewDescriptor.mm @@ -9,8 +9,14 @@ #import "SKComponentHostingViewDescriptor.h" +// TODO T41966103 Remove conditional imports +#if FLIPPER_OSS #import #import +#else +#import +#import +#endif #import #import #import diff --git a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.mm b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.mm index adfe43442..c5abbacb3 100644 --- a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.mm +++ b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.mm @@ -11,8 +11,14 @@ #import #import +// TODO T41966103 Remove conditional imports +#if FLIPPER_OSS #import #import +#else +#import +#import +#endif #import static char const kLayoutWrapperKey = ' '; diff --git a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentRootViewDescriptor.mm b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentRootViewDescriptor.mm index a9f73c825..0ac655c2b 100644 --- a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentRootViewDescriptor.mm +++ b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentRootViewDescriptor.mm @@ -9,8 +9,14 @@ #import "SKComponentRootViewDescriptor.h" +// TODO T41966103 Remove conditional imports +#if FLIPPER_OSS #import #import +#else +#import +#import +#endif #import #import #import @@ -28,7 +34,7 @@ - (NSUInteger)childCountForNode:(CKComponentRootView *)node { if ([node respondsToSelector:@selector(ck_attachState)]) { - CKComponentDataSourceAttachState *state = [node ck_attachState]; + const auto state = [node ck_attachState]; return state == nil ? 0 : 1; } return 0;