Skip to content

Commit

Permalink
Fix symbol collision with react-native-keyboard-input (#6030)
Browse files Browse the repository at this point in the history
  • Loading branch information
yogevbd authored Mar 11, 2020
1 parent 0f227f9 commit 8ad40e1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/ios/Color+Interpolation.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
/**
Interpolate using the LAB color space for optimal quality. This constant is equal to @c LNUseDefaultInterpolationBehavior.
*/
extern LNInterpolationBehavior const LNInterpolationBehaviorUseLABColorSpace;
extern LNInterpolationBehavior const RNNInterpolationBehaviorUseLABColorSpace;

/**
Interpolate using the RGB color space.
*/
extern LNInterpolationBehavior const LNInterpolationBehaviorUseRGBColorSpace;
extern LNInterpolationBehavior const RNNInterpolationBehaviorUseRGBColorSpace;

/**
Interpolates between colors.
Expand Down
6 changes: 3 additions & 3 deletions lib/ios/Color+Interpolation.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#define SWAP(x, y) do { __typeof(x) __ZZZZ__SWAP = x; x = y; y = __ZZZZ__SWAP; } while(0)

//Same value as LNInterpolationBehaviorUseDefault
LNInterpolationBehavior const LNInterpolationBehaviorUseLABColorSpace = @"LNInterpolationBehaviorUseDefault";
LNInterpolationBehavior const LNInterpolationBehaviorUseRGBColorSpace = @"LNInterpolationBehaviorUseRGB";
LNInterpolationBehavior const RNNInterpolationBehaviorUseLABColorSpace = @"LNInterpolationBehaviorUseDefault";
LNInterpolationBehavior const RNNInterpolationBehaviorUseRGBColorSpace = @"LNInterpolationBehaviorUseRGB";

extern double LNLinearInterpolate(double from, double to, double p);

Expand Down Expand Up @@ -149,7 +149,7 @@ - (instancetype)interpolateToValue:(id)toValue progress:(double)p behavior:(LNIn
return toValue;
}

return LNInterpolateColor(self, toValue, p, behavior == LNInterpolationBehaviorUseRGBColorSpace ? LNRGBComponentsFromColor : LNLabComponentsFromColor, behavior == LNInterpolationBehaviorUseRGBColorSpace ? LNColorFromRGBComponents : LNColorFromLabComponents);
return LNInterpolateColor(self, toValue, p, behavior == RNNInterpolationBehaviorUseRGBColorSpace ? LNRGBComponentsFromColor : LNLabComponentsFromColor, behavior == RNNInterpolationBehaviorUseRGBColorSpace ? LNColorFromRGBComponents : LNColorFromLabComponents);
}

@end
Expand Down
2 changes: 1 addition & 1 deletion lib/ios/RNNInterpolator.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@implementation RNNInterpolator

+ (UIColor *)fromColor:(UIColor *)fromColor toColor:(UIColor *)toColor precent:(CGFloat)precent {
return [fromColor ?: UIColor.clearColor interpolateToValue:toColor ?: UIColor.clearColor progress:precent behavior:LNInterpolationBehaviorUseLABColorSpace];
return [fromColor ?: UIColor.clearColor interpolateToValue:toColor ?: UIColor.clearColor progress:precent behavior:RNNInterpolationBehaviorUseLABColorSpace];
}

+ (CGFloat)fromFloat:(CGFloat)from toFloat:(CGFloat)to precent:(CGFloat)precent interpolation:(RNNInterpolationOptions)interpolation {
Expand Down

2 comments on commit 8ad40e1

@AugustoAleGon
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yogevbd this commit is already deployed?

@guyca
Copy link
Collaborator

@guyca guyca commented on 8ad40e1 Mar 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AugustoAleGon You can use the snapshot version which contains it - 6.2.0-snapshot.875

Please sign in to comment.