Skip to content

Commit a29ddcf

Browse files
authored
Merge pull request #49 from just4fun/v1.7.1-latest
v1.7.1 (new)
2 parents 6fb452e + 2664223 commit a29ddcf

File tree

32 files changed

+286
-175
lines changed

32 files changed

+286
-175
lines changed

README.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,30 @@
1-
[<img width="200" alt="new_logo" src="https://user-images.githubusercontent.com/7512625/34460783-aaf95076-ee53-11e7-8699-3e94b6a0c270.png">](https://user-images.githubusercontent.com/7512625/34460783-aaf95076-ee53-11e7-8699-3e94b6a0c270.png)
2-
3-
[![React Native](https://img.shields.io/badge/react--native-v0.51.0-05A5D1.svg)](https://facebook.github.io/react-native)
4-
[![GitHub issues](https://img.shields.io/github/issues/just4fun/stuhome.svg)](https://github.com/just4fun/stuhome/issues)
5-
[![MIT](https://img.shields.io/dub/l/vibe-d.svg)](http://opensource.org/licenses/MIT)
6-
7-
An officially recommended 3rd party iOS client for http://bbs.uestc.edu.cn/ written in [react-native](https://facebook.github.io/react-native/), [redux](http://redux.js.org/) and [redux-observable](https://redux-observable.js.org/).
1+
<p align="center">
2+
<img width="200" alt="new_logo" src="https://user-images.githubusercontent.com/7512625/34460783-aaf95076-ee53-11e7-8699-3e94b6a0c270.png">
3+
<p align="center">
4+
<img alt="alu" src="https://user-images.githubusercontent.com/7512625/49665467-eb50ab80-fa8f-11e8-871c-5928dc2c3cb8.gif" />
5+
<img alt="alu" src="https://user-images.githubusercontent.com/7512625/49665467-eb50ab80-fa8f-11e8-871c-5928dc2c3cb8.gif" />
6+
<img alt="alu" src="https://user-images.githubusercontent.com/7512625/49665467-eb50ab80-fa8f-11e8-871c-5928dc2c3cb8.gif" />
7+
</p>
8+
<p align="center">
9+
<a href="https://facebook.github.io/react-native">
10+
<img alt="React Native" src="https://img.shields.io/badge/react--native-v0.51.0-05A5D1.svg" />
11+
</a>
12+
<a href="https://github.com/just4fun/stuhome/issues">
13+
<img alt="GitHub issues" src="https://img.shields.io/github/issues/just4fun/stuhome.svg" />
14+
</a>
15+
<a href="http://opensource.org/licenses/MIT">
16+
<img alt="MIT" src="https://img.shields.io/dub/l/vibe-d.svg" />
17+
</a>
18+
</p>
19+
</p>
20+
21+
## What
22+
23+
An iOS client for http://bbs.uestc.edu.cn/ written in [react-native](https://facebook.github.io/react-native/), [redux](http://redux.js.org/) and [redux-observable](https://redux-observable.js.org/), which has been [recommended officially](http://bbs.uestc.edu.cn/forum.php?mod=viewthread&tid=1554255) as one of the best 3rd party iOS clients.
824

925
APIs are provided by [appbyme/mobcent-discuz](https://github.com/appbyme/mobcent-discuz) and partly documented by [UESTC-BBS/API-Docs](https://github.com/UESTC-BBS/API-Docs/wiki/Mobcent-API).
1026

11-
For all officially recommended clients, please visit http://bbs.uestc.edu.cn/forum.php?mod=viewthread&tid=1554255.
12-
13-
## Status (v1.7.0)
27+
## Status (v1.7.1)
1428

1529
[<img width="250" alt="download_on_the_app_store" src="https://user-images.githubusercontent.com/7512625/27969868-353f554c-637f-11e7-869d-3963933461ca.png">](https://itunes.apple.com/cn/app/qing-shui-he-pan-stuhome/id1190564355)
1630

ios/stuhome/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundlePackageType</key>
2020
<string>APPL</string>
2121
<key>CFBundleShortVersionString</key>
22-
<string>1.7.0</string>
22+
<string>1.7.1</string>
2323
<key>CFBundleSignature</key>
2424
<string>????</string>
2525
<key>CFBundleVersion</key>

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stuhome",
3-
"version": "1.7.0",
3+
"version": "1.7.1",
44
"description": "An officially recommended 3rd party iOS client for http://bbs.uestc.edu.cn/ written in react-native, redux and redux-observable.",
55
"author": "just4fun <houritsunohikari@gmail.com>",
66
"scripts": {
@@ -20,7 +20,7 @@
2020
"apsl-react-native-button": "3.1.0",
2121
"lodash": "4.17.4",
2222
"md5": "2.1.0",
23-
"moment": "2.19.3",
23+
"moment": "^2.19.0",
2424
"react": "16.0.0",
2525
"react-native": "0.51.0",
2626
"react-native-checkbox": "2.0.0",
@@ -36,7 +36,7 @@
3636
"react-native-smart-timer-enhance": "1.0.3",
3737
"react-native-sticky-keyboard-accessory": "0.1.1",
3838
"react-native-vector-icons": "4.4.3",
39-
"react-navigation": "1.0.3",
39+
"react-navigation": "2.18.3",
4040
"react-redux": "5.0.6",
4141
"redux": "3.3.1",
4242
"redux-actions": "1.2.1",

src/common/vendor/components/GiftedChatMessageText.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,12 @@ export default class MessageText extends React.Component {
8181
]}
8282
childrenProps={{...this.props.textProps}}
8383
>
84-
{parseContentWithEmoji(this.props.currentMessage.text)}
84+
{
85+
// In private message, no need to custom the size for emoji,
86+
// since the font size setting is only used for topic content.
87+
// So `0` for 2nd parameter here.
88+
}
89+
{parseContentWithEmoji(this.props.currentMessage.text, 0)}
8590
</ParsedText>
8691
</View>
8792
);

src/components/Avatar/Avatar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default Avatar = (props) => {
3030
// 3. Same user (in individual page)
3131
if (!currentUserId || !userId || +userId === +currentUserId) { return; }
3232

33-
navigation.navigate('Individual', {
33+
navigation.push('Individual', {
3434
userId,
3535
userName,
3636
currentUserId

src/components/Comment/Comment.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default class Comment extends Component {
5858
(buttonIndex) => {
5959
switch (buttonIndex) {
6060
case 0:
61-
navigation.navigate('ReplyModal', {
61+
navigation.push('ReplyModal', {
6262
// `comment` here is item from `forum/postlist`, which has
6363
// no `topicId` and `boardId`, but necessary for topic reply
6464
// API.
@@ -80,7 +80,7 @@ export default class Comment extends Component {
8080
break;
8181
case 2:
8282
if (canSendPrivateMessage) {
83-
navigation.navigate('PrivateMessage', { userId });
83+
navigation.push('PrivateMessage', { userId });
8484
} else if (editable) {
8585
const editAction = managePanel.find(item => item.title === '编辑');
8686
SafariView.show(editAction.action);

src/components/Content/Content.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export default class Content extends Component {
113113
render() {
114114
const newContent = this.getContentByGroup();
115115
const { navigation, settings } = this.props;
116-
const { fontSize, lineHeight } = FONT_SIZES[settings.fontSize];
116+
const { fontSize, lineHeight, emojiSize } = FONT_SIZES[settings.fontSize];
117117
const fontStyle = {
118118
fontSize,
119119
lineHeight
@@ -138,14 +138,14 @@ export default class Content extends Component {
138138
{groupContent.map((item, index) => {
139139
return (
140140
item.type === 0 && (
141-
<Text key={index}>{parseContentWithEmoji(item.infor)}</Text>
141+
<Text key={index}>{parseContentWithEmoji(item.infor, emojiSize)}</Text>
142142
) || (
143143
this.isAtSomebody(item.url) && (
144144
// @somebody
145145
<Text
146146
key={index}
147147
style={styles.url}
148-
onPress={() => navigation.navigate('Individual', {
148+
onPress={() => navigation.push('Individual', {
149149
userId: this.getUserId(item.url),
150150
userName: this.getUserName(item.infor)
151151
})}>
@@ -159,7 +159,7 @@ export default class Content extends Component {
159159
<Text
160160
key={index}
161161
style={styles.url}
162-
onPress={() => navigation.navigate('Topic', {
162+
onPress={() => navigation.push('Topic', {
163163
topic_id: this.getTopicId(item.url)
164164
})}>
165165
{item.infor}

src/components/MenuButton/MenuButton.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ export default class MenuButton extends Component {
1616
} = this.props;
1717

1818
if (isLogin) {
19-
navigation.navigate('DrawerToggle');
19+
navigation.openDrawer();
2020
} else {
21-
navigation.navigate('LoginModal');
21+
navigation.push('LoginModal');
2222
}
2323
}
2424

src/components/MenuProfile/MenuProfile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export default MenuProfile = (props) => {
2727
{token &&
2828
<TouchableOpacity
2929
style={styles.avatar}
30+
// https://reactnavigation.org/docs/en/navigation-prop.html
3031
onPress={() => navigation.navigate('Information', { userId: uid })}>
3132
<Image
3233
key={avatar}
@@ -36,7 +37,7 @@ export default MenuProfile = (props) => {
3637
||
3738
<TouchableOpacity
3839
style={styles.avatar}
39-
onPress={() => navigation.navigate('LoginModal')}>
40+
onPress={() => navigation.push('LoginModal')}>
4041
<Image
4142
key='noavatar'
4243
style={styles.avatar}

src/components/NotifyItem/NotifyItem.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default NotifyItem = (props) => {
4141
<TouchableHighlight
4242
style={styles.container}
4343
underlayColor={colors.underlay}
44-
onPress={() => navigation.navigate('Topic', {
44+
onPress={() => navigation.push('Topic', {
4545
topic_id,
4646
board_id,
4747
board_name
@@ -68,7 +68,7 @@ export default NotifyItem = (props) => {
6868
<Button
6969
style={styles.button}
7070
textStyle={styles.buttonText}
71-
onPress={() => navigation.navigate('ReplyModal', {
71+
onPress={() => navigation.push('ReplyModal', {
7272
comment: {
7373
// WTF! Why there are different names for common field?!
7474
reply_name: reply_nick_name,

0 commit comments

Comments
 (0)