Skip to content

chore: Upgrade to RN 0.49.3 #523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@
"lodash.uniqby": "^4.7.0",
"lowlight": "^1.5.0",
"md5": "^2.2.1",
"moment": "^2.17.1",
"moment": "^2.19.0",
"node-emoji": "^1.7.0",
"opencollective": "^1.0.3",
"parse-diff": "^0.4.0",
"query-string": "^4.3.1",
"react": "^16.0.0",
"react-native": "^0.48.4",
"react-native": "^0.49.3",
"react-native-actionsheet": "^2.2.0",
"react-native-code-push": "^5.0.0-beta",
"react-native-collapsible": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion src/auth/screens/events.screen.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { StyleSheet, Text, FlatList, View } from 'react-native';
import moment from 'moment/min/moment-with-locales.min';
import moment from 'moment/min/moment-with-locales';

import { LoadingUserListItem, UserListItem, ViewContainer } from 'components';
import { colors, fonts, normalize } from 'config';
Expand Down
2 changes: 1 addition & 1 deletion src/components/comment-list-item.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { GithubHtmlView } from 'components';
import { Icon } from 'react-native-elements';
import ActionSheet from 'react-native-actionsheet';

import moment from 'moment/min/moment-with-locales.min';
import moment from 'moment/min/moment-with-locales';

import { translate } from 'utils';
import { colors, fonts, normalize } from 'config';
Expand Down
114 changes: 61 additions & 53 deletions src/components/issue-description.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Component } from 'react';
import { StyleSheet, View, ActivityIndicator } from 'react-native';
import { ListItem } from 'react-native-elements';
import Parse from 'parse-diff';
import moment from 'moment/min/moment-with-locales.min';
import moment from 'moment/min/moment-with-locales';

import {
StateBadge,
Expand Down Expand Up @@ -115,7 +115,7 @@ export class IssueDescription extends Component {

return (
<View style={(styles.container, styles.borderBottom)}>
{issue.repository_url &&
{issue.repository_url && (
<ListItem
title={issue.repository_url.replace(`${v3.root}/repos/`, '')}
titleStyle={styles.titleSmall}
Expand All @@ -127,7 +127,8 @@ export class IssueDescription extends Component {
}}
onPress={() => onRepositoryPress(issue.repository_url)}
hideChevron
/>}
/>
)}

<View style={styles.headerContainer}>
<ListItem
Expand All @@ -146,68 +147,75 @@ export class IssueDescription extends Component {

{!issue.pull_request ||
(issue.pull_request &&
!isPendingCheckMerge &&
<StateBadge
style={styles.badge}
issue={issue}
isMerged={isMerged && issue.pull_request}
locale={locale}
/>)}
!isPendingCheckMerge && (
<StateBadge
style={styles.badge}
issue={issue}
isMerged={isMerged && issue.pull_request}
locale={locale}
/>
))}
</View>

{issue.pull_request &&
{issue.pull_request && (
<View style={styles.diffBlocksContainer}>
{isPendingDiff &&
<ActivityIndicator animating={isPendingDiff} size="small" />}
{isPendingDiff && (
<ActivityIndicator animating={isPendingDiff} size="small" />
)}

{!isPendingDiff &&
(lineAdditions !== 0 || lineDeletions !== 0) &&
<DiffBlocks
additions={lineAdditions}
deletions={lineDeletions}
showNumbers
onPress={() =>
navigation.navigate('PullDiff', {
title: translate('repository.pullDiff.title', locale),
locale,
diff,
})}
/>}
</View>}
(lineAdditions !== 0 || lineDeletions !== 0) && (
<DiffBlocks
additions={lineAdditions}
deletions={lineDeletions}
showNumbers
onPress={() =>
navigation.navigate('PullDiff', {
title: translate('repository.pullDiff.title', locale),
locale,
diff,
})}
/>
)}
</View>
)}

{issue.labels &&
issue.labels.length > 0 &&
<View style={styles.labelButtonGroup}>
{this.renderLabelButtons(issue.labels)}
</View>}
issue.labels.length > 0 && (
<View style={styles.labelButtonGroup}>
{this.renderLabelButtons(issue.labels)}
</View>
)}
{issue.assignees &&
issue.assignees.length > 0 &&
<View style={styles.assigneesSection}>
<MembersList
title={translate('issue.main.assignees', locale)}
members={issue.assignees}
containerStyle={{ marginTop: 0, paddingTop: 0, paddingLeft: 0 }}
smallTitle
navigation={navigation}
/>
</View>}
issue.assignees.length > 0 && (
<View style={styles.assigneesSection}>
<MembersList
title={translate('issue.main.assignees', locale)}
members={issue.assignees}
containerStyle={{ marginTop: 0, paddingTop: 0, paddingLeft: 0 }}
smallTitle
navigation={navigation}
/>
</View>
)}

{issue.pull_request &&
!isMerged &&
issue.state === 'open' &&
userHasPushPermission &&
<View style={styles.mergeButtonContainer}>
<Button
type={isMergeable ? 'success' : 'default'}
icon={{ name: 'git-merge', type: 'octicon' }}
disabled={!isMergeable}
onPress={() =>
navigation.navigate('PullMerge', {
title: translate('issue.pullMerge.title', locale),
})}
title={translate('issue.main.mergeButton', locale)}
/>
</View>}
userHasPushPermission && (
<View style={styles.mergeButtonContainer}>
<Button
type={isMergeable ? 'success' : 'default'}
icon={{ name: 'git-merge', type: 'octicon' }}
disabled={!isMergeable}
onPress={() =>
navigation.navigate('PullMerge', {
title: translate('issue.pullMerge.title', locale),
})}
title={translate('issue.main.mergeButton', locale)}
/>
</View>
)}
</View>
);
}
Expand Down
24 changes: 9 additions & 15 deletions src/components/issue-event-list-item.component.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { View, Text, StyleSheet } from 'react-native';
import { Icon } from 'react-native-elements';
import moment from 'moment/min/moment-with-locales.min';
import moment from 'moment/min/moment-with-locales';
import { colors, fonts, normalize } from 'config';
import { InlineLabel } from 'components';

Expand Down Expand Up @@ -109,7 +109,8 @@ export class IssueEventListItem extends Component {
<View style={styles.eventTextContainer}>
<ActorLink actor={event.actor} onPress={this.onPressUser} />
<Text>
{' '}{event.event === 'unlabeled' ? 'removed' : 'added'}{' '}
{' '}
{event.event === 'unlabeled' ? 'removed' : 'added'}{' '}
</Text>
<InlineLabel label={event.label} />
</View>
Expand Down Expand Up @@ -359,13 +360,9 @@ class Event extends Component {
size={16}
/>
<View style={styles.contentContainer}>
<View style={styles.eventTextContainer}>
{text}
</View>
<View style={styles.eventTextContainer}>{text}</View>
<View style={styles.dateContainer}>
<Text style={styles.date}>
{moment(createdAt).fromNow()}
</Text>
<Text style={styles.date}>{moment(createdAt).fromNow()}</Text>
</View>
</View>
</View>
Expand All @@ -387,8 +384,9 @@ class LabelGroup extends Component {
created_at: createdAt,
} = this.props.group;

const toInlineLabel = (type, { label }, index) =>
<InlineLabel key={type + index} label={label} />;
const toInlineLabel = (type, { label }, index) => (
<InlineLabel key={type + index} label={label} />
);

/* eslint-disable react/jsx-no-bind */
const labels = labeled.map(toInlineLabel.bind(null, 'added'));
Expand Down Expand Up @@ -450,10 +448,6 @@ class Bold extends Component {
};

render() {
return (
<Text style={styles.boldText}>
{this.props.children}
</Text>
);
return <Text style={styles.boldText}>{this.props.children}</Text>;
}
}
2 changes: 1 addition & 1 deletion src/components/issue-list-item.component.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { StyleSheet, TouchableHighlight, View, Text } from 'react-native';
import { ListItem, Icon } from 'react-native-elements';
import moment from 'moment/min/moment-with-locales.min';
import moment from 'moment/min/moment-with-locales';

import { colors, fonts, normalize } from 'config';
import { translate } from 'utils';
Expand Down
2 changes: 1 addition & 1 deletion src/utils/event-helpers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import moment from 'moment/min/moment-with-locales.min';
import moment from 'moment/min/moment-with-locales';

export function formatEventsToRender(events = []) {
return events
Expand Down
2 changes: 1 addition & 1 deletion src/utils/localization-helper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AsyncStorage } from 'react-native';
import moment from 'moment/min/moment-with-locales.min';
import moment from 'moment/min/moment-with-locales';

import { common } from 'config';
import I18n from 'locale';
Expand Down
Loading