Skip to content
Permalink
Browse files

Typos in code

Summary:
To fix typos

No testing required, changed only internal things names

No

addtionalStyles -> additionalStyles
occured -> occurred
recomendedType -> recommendedType
markDirtyAndPropogate -> markDirtyAndPropagate
targetting -> targeting
RCTApplyTranformationAccordingLayoutDirection -> RCTApplyTransformationAccordingLayoutDirection (tranform -> transform)
Closes #17587

Differential Revision: D6832696

Pulled By: shergin

fbshipit-source-id: 452287e5ce82df5c6b87126cb21889b7bd9d73c1
  • Loading branch information...
ss18 authored and facebook-github-bot committed Jan 30, 2018
1 parent 28d60b6 commit 8ffc16c6e7d25dd434ca3fc7f9ffd6d5917f7bcd
@@ -208,7 +208,7 @@ class Inspector extends React.Component<{
});
}

setTouchTargetting(val: bool) {
setTouchTargeting(val: bool) {
Touchable.TOUCH_TARGET_DEBUG = val;
this.props.onRequestRerenderApp((inspectedViewTag) => {
this.setState({inspectedViewTag});
@@ -247,8 +247,8 @@ class Inspector extends React.Component<{
hierarchy={this.state.hierarchy}
selection={this.state.selection}
setSelection={this.setSelection.bind(this)}
touchTargetting={Touchable.TOUCH_TARGET_DEBUG}
setTouchTargetting={this.setTouchTargetting.bind(this)}
touchTargeting={Touchable.TOUCH_TARGET_DEBUG}
setTouchTargeting={this.setTouchTargeting.bind(this)}
networking={this.state.networking}
setNetworking={this.setNetworking.bind(this)}
/>
@@ -82,8 +82,8 @@ class InspectorPanel extends React.Component<$FlowFixMeProps> {
onClick={this.props.setNetworking}
/>
<Button title={'Touchables'}
pressed={this.props.touchTargetting}
onClick={this.props.setTouchTargetting}
pressed={this.props.touchTargeting}
onClick={this.props.setTouchTargeting}
/>
</View>
</View>
@@ -98,8 +98,8 @@ InspectorPanel.propTypes = {
inspected: PropTypes.object,
perfing: PropTypes.bool,
setPerfing: PropTypes.func,
touchTargetting: PropTypes.bool,
setTouchTargetting: PropTypes.func,
touchTargeting: PropTypes.bool,
setTouchTargeting: PropTypes.func,
networking: PropTypes.bool,
setNetworking: PropTypes.func,
};
@@ -79,10 +79,10 @@ if (__DEV__) {
return typeRecommendations.sort(recommendationSort)[0];
};

var typeRecommendationFor = function (type, recomendedType) {
var typeRecommendationFor = function (type, recommendedType) {
return {
type: recomendedType,
distance: damerauLevenshteinDistance(type, recomendedType)
type: recommendedType,
distance: damerauLevenshteinDistance(type, recommendedType)
};
};

@@ -81,11 +81,11 @@ exports.examples = [
render: function() {
function renderScrollView(
title: string,
addtionalStyles: typeof StyleSheet,
additionalStyles: typeof StyleSheet,
) {
let _scrollView: ScrollView;
return (
<View style={addtionalStyles}>
<View style={additionalStyles}>
<Text style={styles.text}>{title}</Text>
<ScrollView
ref={scrollView => {
@@ -457,14 +457,14 @@ - (BOOL)synchronouslyWaitForStage:(RCTSurfaceStage)stage timeout:(NSTimeInterval
RCTAssert(NO, @"Only waiting for `RCTSurfaceStageSurfaceDidInitialRendering` and `RCTSurfaceStageSurfaceDidInitialLayout` stages is supported.");
}

BOOL timeoutOccured = dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, timeout * NSEC_PER_SEC));
if (!timeoutOccured) {
BOOL timeoutOccurred = dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, timeout * NSEC_PER_SEC));
if (!timeoutOccurred) {
// Balancing the semaphore.
// Note: `dispatch_semaphore_wait` reverts the decrement in case when timeout occured.
// Note: `dispatch_semaphore_wait` reverts the decrement in case when timeout occurred.
dispatch_semaphore_signal(semaphore);
}

return !timeoutOccured;
return !timeoutOccurred;
}

#pragma mark - RCTSurfaceRootShadowViewDelegate
@@ -419,7 +419,7 @@ - (instancetype)initWithEventDispatcher:(RCTEventDispatcher *)eventDispatcher
RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder)

static inline void RCTApplyTranformationAccordingLayoutDirection(UIView *view, UIUserInterfaceLayoutDirection layoutDirection) {
static inline void RCTApplyTransformationAccordingLayoutDirection(UIView *view, UIUserInterfaceLayoutDirection layoutDirection) {
view.transform =
layoutDirection == UIUserInterfaceLayoutDirectionLeftToRight ?
CGAffineTransformIdentity :
@@ -430,8 +430,8 @@ - (void)setReactLayoutDirection:(UIUserInterfaceLayoutDirection)layoutDirection
{
[super setReactLayoutDirection:layoutDirection];

RCTApplyTranformationAccordingLayoutDirection(_scrollView, layoutDirection);
RCTApplyTranformationAccordingLayoutDirection(_contentView, layoutDirection);
RCTApplyTransformationAccordingLayoutDirection(_scrollView, layoutDirection);
RCTApplyTransformationAccordingLayoutDirection(_contentView, layoutDirection);
}

- (void)setRemoveClippedSubviews:(__unused BOOL)removeClippedSubviews
@@ -450,7 +450,7 @@ - (void)insertReactSubview:(UIView *)view atIndex:(NSInteger)atIndex
{
RCTAssert(_contentView == nil, @"RCTScrollView may only contain a single subview");
_contentView = view;
RCTApplyTranformationAccordingLayoutDirection(_contentView, self.reactLayoutDirection);
RCTApplyTransformationAccordingLayoutDirection(_contentView, self.reactLayoutDirection);
[_scrollView addSubview:view];
}
}
@@ -21,25 +21,25 @@ jint initialize(JavaVM* vm, std::function<void()>&& init_fn) noexcept {
static std::once_flag flag{};
// TODO (t7832883): DTRT when we have exception pointers
static auto error_msg = std::string{"Failed to initialize fbjni"};
static auto error_occured = false;
static auto error_occurred = false;

std::call_once(flag, [vm] {
try {
Environment::initialize(vm);
} catch (std::exception& ex) {
error_occured = true;
error_occurred = true;
try {
error_msg = std::string{"Failed to initialize fbjni: "} + ex.what();
} catch (...) {
// Ignore, we already have a fall back message
}
} catch (...) {
error_occured = true;
error_occurred = true;
}
});

try {
if (error_occured) {
if (error_occurred) {
throw std::runtime_error(error_msg);
}

0 comments on commit 8ffc16c

Please sign in to comment.
You can’t perform that action at this time.