Skip to content

Commit

Permalink
[fabric] Fix warning & formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
shwanton committed May 1, 2024
1 parent fe4989a commit 6b0fd9c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ NS_ASSUME_NONNULL_BEGIN
#if !TARGET_OS_OSX // [macOS]
@property (nonatomic, assign, getter=isEditable) BOOL editable;
#else // [macOS
@property (assign, getter=isEditable) BOOL editable;
@property (atomic, assign, getter=isEditable) BOOL editable;
#endif // macOS]
@property (nonatomic, getter=isScrollEnabled) BOOL scrollEnabled;
@property (nonatomic, strong, nullable) NSString *inputAccessoryViewID;
Expand All @@ -56,7 +56,7 @@ NS_ASSUME_NONNULL_BEGIN
#if TARGET_OS_OSX // [macOS
@property (nonatomic, copy, nullable) NSString *text;
@property (nonatomic, copy, nullable) NSAttributedString *attributedText;
@property (nonatomic, copy) NSDictionary<NSAttributedStringKey, id> *defaultTextAttributes;
@property (nonatomic, strong, nullable) NSDictionary<NSAttributedStringKey, id> *defaultTextAttributes;
@property (nonatomic, assign) NSTextAlignment textAlignment;
@property (nonatomic, getter=isAutomaticTextReplacementEnabled) BOOL automaticTextReplacementEnabled;
@property (nonatomic, getter=isAutomaticSpellingCorrectionEnabled) BOOL automaticSpellingCorrectionEnabled;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ @implementation RCTUITextField {
#endif
RCTBackedTextFieldDelegateAdapter *_textInputDelegateAdapter;
NSDictionary<NSAttributedStringKey, id> *_defaultTextAttributes;
#if TARGET_OS_OSX // [macOS
NSArray<NSPasteboardType> *_readablePasteboardTypes;
#endif // macOS]
}

#if TARGET_OS_OSX // [macOS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
#import <react/utils/ManagedObjectWrapper.h>
#import "RCTLegacyViewManagerInteropCoordinatorAdapter.h"

#if TARGET_OS_OSX // [macOS
#import <React/RCTView.h>
#endif // macOS]

using namespace facebook::react;

static NSString *const kRCTLegacyInteropChildComponentKey = @"childComponentView";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ - (BOOL)resignFirstResponder
return [super resignFirstResponder];
}

@end

@interface RCTParagraphComponentView () <NSTextViewDelegate>
@end
#endif // macOS]

Expand All @@ -67,11 +64,12 @@ @implementation RCTParagraphComponentView {
ParagraphShadowNode::ConcreteState::Shared _state;
ParagraphAttributes _paragraphAttributes;
RCTParagraphComponentAccessibilityProvider *_accessibilityProvider;

UILongPressGestureRecognizer *_longPressGestureRecognizer;
CAShapeLayer *_highlightLayer;
}
#else // [macOS
@interface RCTParagraphComponentView () <NSTextViewDelegate>
@end

@implementation RCTParagraphComponentView {
ParagraphShadowNode::ConcreteState::Shared _state;
ParagraphAttributes _paragraphAttributes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ UITextAutocapitalizationType RCTUITextAutocapitalizationTypeFromAutocapitalizati

UIKeyboardAppearance RCTUIKeyboardAppearanceFromKeyboardAppearance(
facebook::react::KeyboardAppearance keyboardAppearance);
#endif

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

UITextFieldViewMode RCTUITextFieldViewModeFromTextInputAccessoryVisibilityMode(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ UIKeyboardAppearance RCTUIKeyboardAppearanceFromKeyboardAppearance(KeyboardAppea
return UIKeyboardAppearanceDark;
}
}
#endif

#if !TARGET_OS_OSX // [macOS]
UITextSpellCheckingType RCTUITextSpellCheckingTypeFromOptionalBool(std::optional<bool> spellCheck)
{
return spellCheck.has_value() ? (*spellCheck ? UITextSpellCheckingTypeYes : UITextSpellCheckingTypeNo)
Expand Down

0 comments on commit 6b0fd9c

Please sign in to comment.