Skip to content

Commit 4c233b1

Browse files
committed
Merge remote-tracking branch 'origin' into mark-all-notifications-as-read
2 parents 28b763a + 6e58176 commit 4c233b1

26 files changed

Lines changed: 773 additions & 310 deletions

App.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ class App extends Component {
5959

6060
persistStore(
6161
configureStore,
62-
{ storage: AsyncStorage, transforms: [encryptor] },
62+
{
63+
storage: AsyncStorage,
64+
transforms: [encryptor],
65+
blacklist: ['user'],
66+
},
6367
() => {
6468
this.setState({ rehydrated: true });
6569
}

routes.js

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ import {
5656
IssueSettingsScreen,
5757
NewIssueScreen,
5858
PullMergeScreen,
59+
EditIssueCommentScreen,
5960
} from 'issue';
6061

6162
const sharedRoutes = {
@@ -158,6 +159,12 @@ const sharedRoutes = {
158159
title: navigation.state.params.title,
159160
}),
160161
},
162+
EditIssueComment: {
163+
screen: EditIssueCommentScreen,
164+
navigationOptions: ({ navigation }) => ({
165+
title: navigation.state.params.title,
166+
}),
167+
},
161168
PullDiff: {
162169
screen: PullDiffScreen,
163170
navigationOptions: ({ navigation }) => ({
@@ -255,49 +262,53 @@ const MainTabNavigator = TabNavigator(
255262
Home: {
256263
screen: HomeStackNavigator,
257264
navigationOptions: {
258-
tabBarIcon: ({ tintColor }) =>
265+
tabBarIcon: ({ tintColor }) => (
259266
<Icon
260267
containerStyle={{ justifyContent: 'center', alignItems: 'center' }}
261268
color={tintColor}
262269
name="home"
263270
size={33}
264-
/>,
271+
/>
272+
),
265273
},
266274
},
267275
Notifications: {
268276
screen: NotificationsStackNavigator,
269277
navigationOptions: {
270-
tabBarIcon: ({ tintColor }) =>
278+
tabBarIcon: ({ tintColor }) => (
271279
<Icon
272280
containerStyle={{ justifyContent: 'center', alignItems: 'center' }}
273281
color={tintColor}
274282
name="notifications"
275283
size={33}
276-
/>,
284+
/>
285+
),
277286
},
278287
},
279288
Search: {
280289
screen: SearchStackNavigator,
281290
navigationOptions: {
282-
tabBarIcon: ({ tintColor }) =>
291+
tabBarIcon: ({ tintColor }) => (
283292
<Icon
284293
containerStyle={{ justifyContent: 'center', alignItems: 'center' }}
285294
color={tintColor}
286295
name="search"
287296
size={33}
288-
/>,
297+
/>
298+
),
289299
},
290300
},
291301
MyProfile: {
292302
screen: MyProfileStackNavigator,
293303
navigationOptions: {
294-
tabBarIcon: ({ tintColor }) =>
304+
tabBarIcon: ({ tintColor }) => (
295305
<Icon
296306
containerStyle={{ justifyContent: 'center', alignItems: 'center' }}
297307
color={tintColor}
298308
name="person"
299309
size={33}
300-
/>,
310+
/>
311+
),
301312
},
302313
},
303314
},
@@ -309,7 +320,7 @@ const MainTabNavigator = TabNavigator(
309320
activeTintColor: colors.primaryDark,
310321
inactiveTintColor: colors.grey,
311322
},
312-
tabBarComponent: ({ jumpToIndex, ...props }) =>
323+
tabBarComponent: ({ jumpToIndex, ...props }) => (
313324
<TabBarBottom
314325
{...props}
315326
jumpToIndex={index => {
@@ -335,7 +346,8 @@ const MainTabNavigator = TabNavigator(
335346
jumpToIndex(index);
336347
}
337348
}}
338-
/>,
349+
/>
350+
),
339351
}
340352
);
341353

src/api/index.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,30 @@ export const fetchPostIssueComment = (
194194
{ body }
195195
);
196196

197+
export const fetchDeleteIssueComment = (
198+
issueCommentId,
199+
owner,
200+
repoName,
201+
accessToken
202+
) =>
203+
v3.delete(
204+
`/repos/${owner}/${repoName}/issues/comments/${issueCommentId}`,
205+
accessToken
206+
);
207+
208+
export const fetchEditIssueComment = (
209+
issueCommentId: number,
210+
owner: string,
211+
repoName: string,
212+
editParams: any,
213+
accessToken: string
214+
) =>
215+
v3.patch(
216+
`/repos/${owner}/${repoName}/issues/comments/${issueCommentId}`,
217+
accessToken,
218+
editParams
219+
);
220+
197221
export const fetchEditIssue = (
198222
owner,
199223
repoName,

src/auth/auth.reducer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ export const authReducer = (state = initialState, action = {}) => {
8484
case GET_AUTH_STAR_COUNT.PENDING:
8585
return {
8686
...state,
87-
starCount: ' ',
8887
isPendingStarCount: true,
8988
};
9089
case GET_AUTH_STAR_COUNT.SUCCESS:

src/auth/screens/auth-profile.screen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class AuthProfile extends Component {
123123
type="user"
124124
initialUser={hasInitialUser ? user : {}}
125125
user={hasInitialUser ? user : {}}
126-
starCount={starCount}
126+
starCount={hasInitialUser ? starCount : ''}
127127
language={language}
128128
navigation={navigation}
129129
/>}
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
export default [
22
{
33
code: 'en',
4-
emojiCode: 'us',
4+
emojiCode: ':flag-us:',
55
name: 'English',
66
},
77
{
88
code: 'fr',
9+
emojiCode: ':flag-fr:',
910
name: 'Français',
1011
},
1112
{
1213
code: 'nl',
14+
emojiCode: ':flag-nl:',
1315
name: 'Nederlands',
1416
},
1517
{
1618
code: 'tr',
19+
emojiCode: ':flag-tr:',
1720
name: 'Türkçe',
1821
},
1922
{
2023
code: 'pt-br',
24+
emojiCode: ':flag-br:',
2125
name: 'Português do Brasil',
2226
},
2327
{
2428
code: 'ru',
29+
emojiCode: ':flag-ru:',
2530
name: 'Русский',
2631
},
2732
];

src/auth/screens/user-options.screen.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ const styles = StyleSheet.create({
6767
paddingRight: 7,
6868
color: colors.black, // random any color for the correct display emoji
6969
},
70+
containerStyle: {
71+
paddingTop: 0,
72+
paddingBottom: 0,
73+
height: 45,
74+
justifyContent: 'center',
75+
alignItems: 'center',
76+
},
7077
});
7178

7279
const updateText = lang => ({
@@ -152,21 +159,20 @@ class UserOptions extends Component {
152159
<FlatList
153160
data={languages}
154161
renderItem={({ item }) => {
155-
const langCode = item.emojiCode || item.code.substring(0, 2);
156-
157162
return (
158163
<ListItem
159164
title={
160165
<View style={styles.language}>
161166
<Text style={styles.flag}>
162-
{emojifyText(`:flag-${langCode}:`)}
167+
{emojifyText(item.emojiCode)}
163168
</Text>
164169
<Text style={styles.listTitle}>
165170
{item.name}
166171
</Text>
167172
</View>
168173
}
169174
titleStyle={styles.listTitle}
175+
containerStyle={styles.containerStyle}
170176
hideChevron={language !== item.code}
171177
rightIcon={{ name: 'check' }}
172178
onPress={() => changeLanguage(item.code)}

0 commit comments

Comments
 (0)