Skip to content

Commit

Permalink
Bring missing changes to 0.58-stable branch
Browse files Browse the repository at this point in the history
This reverts commit b864e7e.
  • Loading branch information
grabbou committed Jan 28, 2019
1 parent a289b7e commit 9d19ab0
Show file tree
Hide file tree
Showing 130 changed files with 2,575 additions and 1,099 deletions.
4 changes: 4 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ untyped-import
untyped-type-import

[version]
<<<<<<< HEAD
^0.85.0

[untyped]
.*/node_modules/metro/.*
=======
^0.86.0
>>>>>>> parent of b864e7e63e... Revert "Merge branch 'master' into 0.58-stable"
4 changes: 4 additions & 0 deletions .flowconfig.android
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ untyped-import
untyped-type-import

[version]
<<<<<<< HEAD
^0.85.0

[untyped]
.*/node_modules/metro/.*
=======
^0.86.0
>>>>>>> parent of b864e7e63e... Revert "Merge branch 'master' into 0.58-stable"
3 changes: 0 additions & 3 deletions Libraries/Animated/src/nodes/AnimatedInterpolation.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,6 @@ class AnimatedInterpolation extends AnimatedWithChildren {
__transformDataType(range: Array<any>) {
// Change the string array type to number array
// So we can reuse the same logic in iOS and Android platform
/* $FlowFixMe(>=0.70.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.70 was deployed. To see the error delete this
* comment and run Flow. */
return range.map(function(value) {
if (typeof value !== 'string') {
return value;
Expand Down
42 changes: 41 additions & 1 deletion Libraries/CameraRoll/RCTImagePickerManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
#import <React/RCTRootView.h>
#import <React/RCTUtils.h>

@interface RCTImagePickerController : UIImagePickerController

@property (nonatomic, assign) BOOL unmirrorFrontFacingCamera;

@end

@implementation RCTImagePickerController

@end

@interface RCTImagePickerManager () <UIImagePickerControllerDelegate, UINavigationControllerDelegate>

@end
Expand All @@ -31,6 +41,22 @@ @implementation RCTImagePickerManager

@synthesize bridge = _bridge;

- (id)init
{
if (self = [super init]) {
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(cameraChanged:)
name:@"AVCaptureDeviceDidStartRunningNotification"
object:nil];
}
return self;
}

- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self name:@"AVCaptureDeviceDidStartRunningNotification" object:nil];
}

- (dispatch_queue_t)methodQueue
{
return dispatch_get_main_queue();
Expand All @@ -56,9 +82,10 @@ - (dispatch_queue_t)methodQueue
return;
}

UIImagePickerController *imagePicker = [UIImagePickerController new];
RCTImagePickerController *imagePicker = [RCTImagePickerController new];
imagePicker.delegate = self;
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePicker.unmirrorFrontFacingCamera = [RCTConvert BOOL:config[@"unmirrorFrontFacingCamera"]];

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

- (void)cameraChanged:(NSNotification *)notification
{
for (UIImagePickerController *picker in _pickers) {
if ([picker isKindOfClass:[RCTImagePickerController class]]
&& ((RCTImagePickerController *)picker).unmirrorFrontFacingCamera
&& picker.cameraDevice == UIImagePickerControllerCameraDeviceFront) {
picker.cameraViewTransform = CGAffineTransformScale(CGAffineTransformIdentity, -1, 1);
} else {
picker.cameraViewTransform = CGAffineTransformIdentity;
}
}
}

@end
25 changes: 20 additions & 5 deletions Libraries/Components/AppleTV/TVViewPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,42 @@ export type TVParallaxPropertiesType = $ReadOnly<{|
/**
* If true, parallax effects are enabled. Defaults to true.
*/
enabled: boolean,
enabled?: boolean,

/**
* Defaults to 2.0.
*/
shiftDistanceX: number,
shiftDistanceX?: number,

/**
* Defaults to 2.0.
*/
shiftDistanceY: number,
shiftDistanceY?: number,

/**
* Defaults to 0.05.
*/
tiltAngle: number,
tiltAngle?: number,

/**
* Defaults to 1.0
*/
magnification: number,
magnification?: number,

/**
* Defaults to 1.0
*/
pressMagnification?: number,

/**
* Defaults to 0.3
*/
pressDuration?: number,

/**
* Defaults to 0.3
*/
pressDelay?: number,
|}>;

/**
Expand Down
Loading

0 comments on commit 9d19ab0

Please sign in to comment.