chore: change fabric flag (#1979)

Changed `RN_FABRIC_ENABLED` to `RCT_NEW_ARCH_ENABLED` since it is the current standard for this flag.
This commit is contained in:
Wojciech Lewicki
2023-01-31 16:15:59 +01:00
committed by GitHub
parent f2f533a292
commit 175a48f8c9
32 changed files with 165 additions and 167 deletions
+6 -6
View File
@@ -17,13 +17,13 @@
static NSCharacterSet *RNSVGTSpan_separators = nil;
static CGFloat RNSVGTSpan_radToDeg = 180 / (CGFloat)M_PI;
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGTSpan {
CGFloat startOffset;
@@ -37,7 +37,7 @@ static CGFloat RNSVGTSpan_radToDeg = 180 / (CGFloat)M_PI;
RNSVGPathMeasure *measure;
}
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -88,7 +88,7 @@ using namespace facebook::react;
measure = [[RNSVGPathMeasure alloc] init];
RNSVGTSpan_separators = [NSCharacterSet whitespaceCharacterSet];
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (id)init
{
@@ -1117,9 +1117,9 @@ RNSVGTopAlignedLabel *label;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGTSpanCls(void)
{
return RNSVGTSpan.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
+6 -6
View File
@@ -13,13 +13,13 @@
#import "RNSVGTextPath.h"
#import "RNSVGTextProperties.h"
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGText {
RNSVGGlyphContext *_glyphContext;
@@ -28,7 +28,7 @@
CGFloat cachedAdvance;
}
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -75,7 +75,7 @@ using namespace facebook::react;
_baselineShift = nil;
cachedAdvance = 0;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (void)invalidate
{
@@ -357,9 +357,9 @@ using namespace facebook::react;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGTextCls(void)
{
return RNSVGText.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
+6 -6
View File
@@ -8,17 +8,17 @@
#import "RNSVGTextPath.h"
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
#import <React/RCTConversions.h>
#import <React/RCTFabricComponentsPlugins.h>
#import <react/renderer/components/rnsvg/ComponentDescriptors.h>
#import <react/renderer/components/view/conversions.h>
#import "RNSVGFabricConversions.h"
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
@implementation RNSVGTextPath
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
using namespace facebook::react;
- (instancetype)initWithFrame:(CGRect)frame
@@ -63,7 +63,7 @@ using namespace facebook::react;
_spacing = nil;
_startOffset = nil;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED
- (void)setHref:(NSString *)href
{
@@ -141,9 +141,9 @@ using namespace facebook::react;
@end
#ifdef RN_FABRIC_ENABLED
#ifdef RCT_NEW_ARCH_ENABLED
Class<RCTComponentViewProtocol> RNSVGTextPathCls(void)
{
return RNSVGTextPath.class;
}
#endif // RN_FABRIC_ENABLED
#endif // RCT_NEW_ARCH_ENABLED