From 1ce8a415561b4744cdfce3d3a09c3f1652beedd5 Mon Sep 17 00:00:00 2001 From: Hugo Cuvillier Date: Thu, 16 Apr 2020 13:47:34 -0700 Subject: [PATCH] Use `component.className` instead of `NSStringFromClass`" Summary: Component classes do not reflect the source of the component anymore. Reviewed By: fabiomassimo Differential Revision: D20595754 fbshipit-source-id: 645a63f78ee6aaaf75ac0c1e08bf67229a3f906b --- .../FlipperKitLayoutComponentKitSupport/CKComponent+Sonar.mm | 4 ++-- .../SKComponentLayoutWrapper.mm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/CKComponent+Sonar.mm b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/CKComponent+Sonar.mm index f0547e576..ab0bdd611 100644 --- a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/CKComponent+Sonar.mm +++ b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/CKComponent+Sonar.mm @@ -109,10 +109,10 @@ static CK::StaticMutex _mutex = CK_MUTEX_INITIALIZER; auto const canBeReusedCounter = self.flipper_canBeReusedCounter; if (canBeReusedCounter > 0) { return [NSString stringWithFormat:@"%@ (Can be reused x%lu)", - NSStringFromClass([self class]), + self.className, (unsigned long)canBeReusedCounter]; } - return NSStringFromClass([self class]); + return self.className; } - (NSString*)sonar_getDecoration { diff --git a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.mm b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.mm index 7d2aafd28..84c16970c 100644 --- a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.mm +++ b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/SKComponentLayoutWrapper.mm @@ -94,7 +94,7 @@ static CKFlexboxComponentChild findFlexboxLayoutParams( _size = layout.size; _position = position; _identifier = [parentKey stringByAppendingString:layout.component - ? NSStringFromClass([layout.component class]) + ? layout.component.className : @"(null)"]; if (_component && reuseWrapper) {