Skip to content

Commit 6b0fd9c

Browse files
committed
[fabric] Fix warning & formatting
1 parent fe4989a commit 6b0fd9c

6 files changed

Lines changed: 7 additions & 15 deletions

File tree

packages/react-native/Libraries/Text/TextInput/Singleline/RCTUITextField.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ NS_ASSUME_NONNULL_BEGIN
4545
#if !TARGET_OS_OSX // [macOS]
4646
@property (nonatomic, assign, getter=isEditable) BOOL editable;
4747
#else // [macOS
48-
@property (assign, getter=isEditable) BOOL editable;
48+
@property (atomic, assign, getter=isEditable) BOOL editable;
4949
#endif // macOS]
5050
@property (nonatomic, getter=isScrollEnabled) BOOL scrollEnabled;
5151
@property (nonatomic, strong, nullable) NSString *inputAccessoryViewID;
@@ -56,7 +56,7 @@ NS_ASSUME_NONNULL_BEGIN
5656
#if TARGET_OS_OSX // [macOS
5757
@property (nonatomic, copy, nullable) NSString *text;
5858
@property (nonatomic, copy, nullable) NSAttributedString *attributedText;
59-
@property (nonatomic, copy) NSDictionary<NSAttributedStringKey, id> *defaultTextAttributes;
59+
@property (nonatomic, strong, nullable) NSDictionary<NSAttributedStringKey, id> *defaultTextAttributes;
6060
@property (nonatomic, assign) NSTextAlignment textAlignment;
6161
@property (nonatomic, getter=isAutomaticTextReplacementEnabled) BOOL automaticTextReplacementEnabled;
6262
@property (nonatomic, getter=isAutomaticSpellingCorrectionEnabled) BOOL automaticSpellingCorrectionEnabled;

packages/react-native/Libraries/Text/TextInput/Singleline/RCTUITextField.mm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ @implementation RCTUITextField {
9393
#endif
9494
RCTBackedTextFieldDelegateAdapter *_textInputDelegateAdapter;
9595
NSDictionary<NSAttributedStringKey, id> *_defaultTextAttributes;
96+
#if TARGET_OS_OSX // [macOS
9697
NSArray<NSPasteboardType> *_readablePasteboardTypes;
98+
#endif // macOS]
9799
}
98100

99101
#if TARGET_OS_OSX // [macOS

packages/react-native/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
#import <react/utils/ManagedObjectWrapper.h>
1616
#import "RCTLegacyViewManagerInteropCoordinatorAdapter.h"
1717

18-
#if TARGET_OS_OSX // [macOS
19-
#import <React/RCTView.h>
20-
#endif // macOS]
21-
2218
using namespace facebook::react;
2319

2420
static NSString *const kRCTLegacyInteropChildComponentKey = @"childComponentView";

packages/react-native/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ - (BOOL)resignFirstResponder
5050
return [super resignFirstResponder];
5151
}
5252

53-
@end
54-
55-
@interface RCTParagraphComponentView () <NSTextViewDelegate>
5653
@end
5754
#endif // macOS]
5855

@@ -67,11 +64,12 @@ @implementation RCTParagraphComponentView {
6764
ParagraphShadowNode::ConcreteState::Shared _state;
6865
ParagraphAttributes _paragraphAttributes;
6966
RCTParagraphComponentAccessibilityProvider *_accessibilityProvider;
70-
7167
UILongPressGestureRecognizer *_longPressGestureRecognizer;
72-
CAShapeLayer *_highlightLayer;
7368
}
7469
#else // [macOS
70+
@interface RCTParagraphComponentView () <NSTextViewDelegate>
71+
@end
72+
7573
@implementation RCTParagraphComponentView {
7674
ParagraphShadowNode::ConcreteState::Shared _state;
7775
ParagraphAttributes _paragraphAttributes;

packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ UITextAutocapitalizationType RCTUITextAutocapitalizationTypeFromAutocapitalizati
3535

3636
UIKeyboardAppearance RCTUIKeyboardAppearanceFromKeyboardAppearance(
3737
facebook::react::KeyboardAppearance keyboardAppearance);
38-
#endif
3938

40-
#if !TARGET_OS_OSX // [macOS]
4139
UITextSpellCheckingType RCTUITextSpellCheckingTypeFromOptionalBool(std::optional<bool> spellCheck);
4240

4341
UITextFieldViewMode RCTUITextFieldViewModeFromTextInputAccessoryVisibilityMode(

packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,7 @@ UIKeyboardAppearance RCTUIKeyboardAppearanceFromKeyboardAppearance(KeyboardAppea
107107
return UIKeyboardAppearanceDark;
108108
}
109109
}
110-
#endif
111110

112-
#if !TARGET_OS_OSX // [macOS]
113111
UITextSpellCheckingType RCTUITextSpellCheckingTypeFromOptionalBool(std::optional<bool> spellCheck)
114112
{
115113
return spellCheck.has_value() ? (*spellCheck ? UITextSpellCheckingTypeYes : UITextSpellCheckingTypeNo)

0 commit comments

Comments
 (0)