react-native-macos 0.71.17 → 0.71.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/RCTImageView.mm +1 -28
- package/React/Base/RCTUIKit.h +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/Base/macOS/RCTUIKit.m +1 -1
- package/React/Views/RCTSwitchManager.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +1 -1
- package/template/package.json +1 -1
|
@@ -131,11 +131,6 @@ static NSDictionary *onLoadParamsForSource(RCTImageSource *source)
|
|
|
131
131
|
|
|
132
132
|
RCTUIImageViewAnimated *_imageView;
|
|
133
133
|
|
|
134
|
-
#if TARGET_OS_OSX // [macOS
|
|
135
|
-
// Whether observing changes to the window's backing scale
|
|
136
|
-
BOOL _subscribedToWindowBackingNotifications;
|
|
137
|
-
#endif // macOS]
|
|
138
|
-
|
|
139
134
|
RCTImageURLLoaderRequest *_loaderRequest;
|
|
140
135
|
}
|
|
141
136
|
|
|
@@ -616,32 +611,10 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame)
|
|
|
616
611
|
#if TARGET_OS_OSX // [macOS
|
|
617
612
|
#define didMoveToWindow viewDidMoveToWindow
|
|
618
613
|
#endif
|
|
619
|
-
#if TARGET_OS_OSX
|
|
620
|
-
- (void)viewWillMoveToWindow:(NSWindow *)newWindow
|
|
621
|
-
{
|
|
622
|
-
if (_subscribedToWindowBackingNotifications &&
|
|
623
|
-
self.window != nil &&
|
|
624
|
-
self.window != newWindow) {
|
|
625
|
-
[[NSNotificationCenter defaultCenter] removeObserver:self
|
|
626
|
-
name:NSWindowDidChangeBackingPropertiesNotification
|
|
627
|
-
object:self.window];
|
|
628
|
-
_subscribedToWindowBackingNotifications = NO;
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
#endif // macOS]
|
|
632
614
|
- (void)didMoveToWindow
|
|
633
615
|
{
|
|
634
616
|
[super didMoveToWindow];
|
|
635
617
|
|
|
636
|
-
#if TARGET_OS_OSX // [macOS
|
|
637
|
-
if (!_subscribedToWindowBackingNotifications && self.window != nil) {
|
|
638
|
-
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
639
|
-
selector:@selector(windowDidChangeBackingProperties:)
|
|
640
|
-
name:NSWindowDidChangeBackingPropertiesNotification
|
|
641
|
-
object:self.window];
|
|
642
|
-
_subscribedToWindowBackingNotifications = YES;
|
|
643
|
-
}
|
|
644
|
-
#endif // macOS]
|
|
645
618
|
if (!self.window) {
|
|
646
619
|
// Cancel loading the image if we've moved offscreen. In addition to helping
|
|
647
620
|
// prioritise image requests that are actually on-screen, this removes
|
|
@@ -655,7 +628,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithFrame : (CGRect)frame)
|
|
|
655
628
|
}
|
|
656
629
|
|
|
657
630
|
#if TARGET_OS_OSX // [macOS
|
|
658
|
-
- (void)
|
|
631
|
+
- (void)viewDidChangeBackingProperties
|
|
659
632
|
{
|
|
660
633
|
[self reloadImage];
|
|
661
634
|
}
|
package/React/Base/RCTUIKit.h
CHANGED
|
@@ -551,7 +551,7 @@ typedef UISwitch RCTUISwitch;
|
|
|
551
551
|
#else
|
|
552
552
|
@interface RCTUISwitch : NSSwitch
|
|
553
553
|
NS_ASSUME_NONNULL_BEGIN
|
|
554
|
-
@property (nonatomic,
|
|
554
|
+
@property (nonatomic, getter=isOn) BOOL on;
|
|
555
555
|
|
|
556
556
|
- (void)setOn:(BOOL)on animated:(BOOL)animated;
|
|
557
557
|
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -662,7 +662,7 @@ BOOL RCTUIViewSetClipsToBounds(RCTPlatformView *view)
|
|
|
662
662
|
|
|
663
663
|
- (void)setOn:(BOOL)on
|
|
664
664
|
{
|
|
665
|
-
self
|
|
665
|
+
[self setOn:on animated:NO];
|
|
666
666
|
}
|
|
667
667
|
|
|
668
668
|
- (void)setOn:(BOOL)on animated:(BOOL)animated {
|
|
@@ -46,7 +46,7 @@ RCT_EXPORT_METHOD(setValue : (nonnull NSNumber *)viewTag toValue : (BOOL)value)
|
|
|
46
46
|
if ([view isKindOfClass:[RCTSwitch class]]) {
|
|
47
47
|
[(RCTSwitch *)view setOn:value animated:NO];
|
|
48
48
|
} else {
|
|
49
|
-
RCTLogError(@"view type must be
|
|
49
|
+
RCTLogError(@"view type must be RCTUISwitch"); // [macOS]
|
|
50
50
|
}
|
|
51
51
|
}];
|
|
52
52
|
}
|
package/package.json
CHANGED