Skip to content

Commit 696bd89

Browse files
committed
Merge branch 'master' into 0.58-stable
2 parents a525941 + 8f283b9 commit 696bd89

File tree

135 files changed

+2517
-1209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+2517
-1209
lines changed

.flowconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,4 @@ untyped-import
101101
untyped-type-import
102102

103103
[version]
104-
^0.85.0
104+
^0.86.0

.flowconfig.android

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,4 @@ untyped-import
101101
untyped-type-import
102102

103103
[version]
104-
^0.85.0
104+
^0.86.0

Libraries/Animated/src/nodes/AnimatedInterpolation.js

-3
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,6 @@ class AnimatedInterpolation extends AnimatedWithChildren {
349349
__transformDataType(range: Array<any>) {
350350
// Change the string array type to number array
351351
// So we can reuse the same logic in iOS and Android platform
352-
/* $FlowFixMe(>=0.70.0 site=react_native_fb) This comment suppresses an
353-
* error found when Flow v0.70 was deployed. To see the error delete this
354-
* comment and run Flow. */
355352
return range.map(function(value) {
356353
if (typeof value !== 'string') {
357354
return value;

Libraries/CameraRoll/RCTImagePickerManager.m

+41-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@
1616
#import <React/RCTRootView.h>
1717
#import <React/RCTUtils.h>
1818

19+
@interface RCTImagePickerController : UIImagePickerController
20+
21+
@property (nonatomic, assign) BOOL unmirrorFrontFacingCamera;
22+
23+
@end
24+
25+
@implementation RCTImagePickerController
26+
27+
@end
28+
1929
@interface RCTImagePickerManager () <UIImagePickerControllerDelegate, UINavigationControllerDelegate>
2030

2131
@end
@@ -31,6 +41,22 @@ @implementation RCTImagePickerManager
3141

3242
@synthesize bridge = _bridge;
3343

44+
- (id)init
45+
{
46+
if (self = [super init]) {
47+
[[NSNotificationCenter defaultCenter] addObserver:self
48+
selector:@selector(cameraChanged:)
49+
name:@"AVCaptureDeviceDidStartRunningNotification"
50+
object:nil];
51+
}
52+
return self;
53+
}
54+
55+
- (void)dealloc
56+
{
57+
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"AVCaptureDeviceDidStartRunningNotification" object:nil];
58+
}
59+
3460
- (dispatch_queue_t)methodQueue
3561
{
3662
return dispatch_get_main_queue();
@@ -56,9 +82,10 @@ - (dispatch_queue_t)methodQueue
5682
return;
5783
}
5884

59-
UIImagePickerController *imagePicker = [UIImagePickerController new];
85+
RCTImagePickerController *imagePicker = [RCTImagePickerController new];
6086
imagePicker.delegate = self;
6187
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
88+
imagePicker.unmirrorFrontFacingCamera = [RCTConvert BOOL:config[@"unmirrorFrontFacingCamera"]];
6289

6390
if ([RCTConvert BOOL:config[@"videoMode"]]) {
6491
imagePicker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModeVideo;
@@ -175,4 +202,17 @@ - (void)_dismissPicker:(UIImagePickerController *)picker args:(NSArray *)args
175202
}
176203
}
177204

205+
- (void)cameraChanged:(NSNotification *)notification
206+
{
207+
for (UIImagePickerController *picker in _pickers) {
208+
if ([picker isKindOfClass:[RCTImagePickerController class]]
209+
&& ((RCTImagePickerController *)picker).unmirrorFrontFacingCamera
210+
&& picker.cameraDevice == UIImagePickerControllerCameraDeviceFront) {
211+
picker.cameraViewTransform = CGAffineTransformScale(CGAffineTransformIdentity, -1, 1);
212+
} else {
213+
picker.cameraViewTransform = CGAffineTransformIdentity;
214+
}
215+
}
216+
}
217+
178218
@end

Libraries/Components/AppleTV/TVViewPropTypes.js

+20-5
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,42 @@ export type TVParallaxPropertiesType = $ReadOnly<{|
1414
/**
1515
* If true, parallax effects are enabled. Defaults to true.
1616
*/
17-
enabled: boolean,
17+
enabled?: boolean,
1818

1919
/**
2020
* Defaults to 2.0.
2121
*/
22-
shiftDistanceX: number,
22+
shiftDistanceX?: number,
2323

2424
/**
2525
* Defaults to 2.0.
2626
*/
27-
shiftDistanceY: number,
27+
shiftDistanceY?: number,
2828

2929
/**
3030
* Defaults to 0.05.
3131
*/
32-
tiltAngle: number,
32+
tiltAngle?: number,
3333

3434
/**
3535
* Defaults to 1.0
3636
*/
37-
magnification: number,
37+
magnification?: number,
38+
39+
/**
40+
* Defaults to 1.0
41+
*/
42+
pressMagnification?: number,
43+
44+
/**
45+
* Defaults to 0.3
46+
*/
47+
pressDuration?: number,
48+
49+
/**
50+
* Defaults to 0.3
51+
*/
52+
pressDelay?: number,
3853
|}>;
3954

4055
/**

0 commit comments

Comments
 (0)