Skip to content
This repository was archived by the owner on Nov 12, 2019. It is now read-only.

Commit c4913d0

Browse files
committed
settingState
1 parent b6ee8f5 commit c4913d0

File tree

16 files changed

+277
-253
lines changed

16 files changed

+277
-253
lines changed

android/app/app-release.apk

824 Bytes
Binary file not shown.

android/app/src/main/assets/index.android.bundle

Lines changed: 216 additions & 216 deletions
Large diffs are not rendered by default.

android/app/src/main/assets/index.android.bundle.meta

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
U\
2-
�� �Dq�V�u�����
1+
����şǩ{k���F��}

js/actions/requestHomeData.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function fetchData(date) {
5353
Toast.show('今日未更新,为您获取往日干货', {position: px2dp(-80)});
5454
dispatch(fetchData(getYesterdayFromDate(date)));
5555
}else {
56-
Toast.show('今日干货还没更新哎~', {position: px2dp(-80)});
56+
Toast.show('今日干货还未更新', {position: px2dp(-80)});
5757
dispatch(receiveData(localData, date));
5858
}
5959
}

js/components/ListViewForHome.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ const styles = StyleSheet.create({
142142
justifyContent: 'center'
143143
},
144144
rowContent: {
145-
fontSize: px2dp(15),
145+
fontSize: px2dp(14),
146146
color: '#000'
147147
}
148148
});

js/components/NavigationBar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ const styles = StyleSheet.create({
131131

132132
const mapStateToProps = (state) => {
133133
return {
134-
mainThemeColor: state.themeColor.mainThemeColor
134+
mainThemeColor: state.settingState.mainThemeColor
135135
};
136136
};
137137

js/containers/DiscoveryTab/TextTabPage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class TextTabPage extends BackPageComponent{
3333
{this.props.error ?
3434
<View style={styles.indicator}>
3535
<Text style={{color: this.props.mainThemeColor}}>Ooops, 获取数据失败~ </Text>
36-
<Button onPress={this._fethchData.bind(this)} title="重新获取"/>
36+
<Button onPress={this._fethchData.bind(this)} title="重新获取" color={this.props.mainThemeColor}/>
3737
</View>
3838
:
3939
(this.props.loading ?
@@ -109,7 +109,7 @@ const mapStateToProps = (state) => {
109109
pageNumber: state.targetData.pageNumber,
110110
isFullData: state.targetData.isFullData,
111111
error: state.targetData.error,
112-
mainThemeColor: state.themeColor.mainThemeColor
112+
mainThemeColor: state.settingState.mainThemeColor
113113
};
114114
};
115115

js/containers/DiscoveryTab/index.js

Lines changed: 45 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ class DiscoveryFragment extends Component{
6262
<RefreshControl
6363
refreshing={this.props.loading}
6464
onRefresh={this._onRefresh.bind(this)}
65+
tintColor={this.props.mainThemeColor}
66+
colors={[this.props.mainThemeColor]}
6567
title="玩命加载中..."
6668
/>}
6769
/>
@@ -71,25 +73,38 @@ class DiscoveryFragment extends Component{
7173

7274
_renderHeader(){
7375
return(
74-
<View style={styles.btnPanel}>
75-
{this.tabNames.map((item, i)=>{
76-
return(
77-
<View style={styles.btnRow} key={i}>
78-
{this.tabNames[i].map((subItem, index) => {
79-
return(
80-
<View style={styles.btnCell} key={subItem}>
81-
<TouchableOpacity
82-
onPress={this._itemPressCallback.bind(this, subItem)}
83-
activeOpacity={theme.touchableOpacityActiveOpacity}>
84-
{this._renderBtnContent(i,index)}
85-
</TouchableOpacity>
86-
<Text style={styles.btnCellLabel}>{subItem}</Text>
87-
</View>
88-
);
89-
})}
90-
</View>
91-
);
92-
})}
76+
<View>
77+
<View style={styles.btnPanel}>
78+
{this.tabNames.map((item, i)=>{
79+
return(
80+
<View style={styles.btnRow} key={i}>
81+
{this.tabNames[i].map((subItem, index) => {
82+
return(
83+
<View style={styles.btnCell} key={subItem}>
84+
<TouchableOpacity
85+
onPress={this._itemPressCallback.bind(this, subItem)}
86+
activeOpacity={theme.touchableOpacityActiveOpacity}>
87+
{this._renderBtnContent(i,index)}
88+
</TouchableOpacity>
89+
<Text style={styles.btnCellLabel}>{subItem}</Text>
90+
</View>
91+
);
92+
})}
93+
</View>
94+
);
95+
})}
96+
</View>
97+
{this.props.loading ?
98+
<View style={styles.fakeListViewHeader}>
99+
<Icon name="md-aperture" size={px2dp(16)}/>
100+
<Text style={{marginLeft: px2dp(5)}}>刷新中...</Text>
101+
</View>
102+
:
103+
<View style={styles.fakeListViewHeader}>
104+
<Icon name="md-aperture" size={px2dp(16)}/>
105+
<Text style={{marginLeft: px2dp(5)}}>随机干货</Text>
106+
</View>
107+
}
93108
</View>
94109
)
95110
}
@@ -276,6 +291,16 @@ const styles = StyleSheet.create({
276291
height: px2dp(60),
277292
alignItems: 'center',
278293
justifyContent: 'center',
294+
},
295+
fakeListViewHeader: {
296+
flexDirection: 'row',
297+
backgroundColor:'#fff',
298+
padding: px2dp(8),
299+
borderBottomColor:theme.segment.color,
300+
borderBottomWidth:theme.segment.width,
301+
borderTopColor: theme.segment.color,
302+
borderTopWidth: theme.segment.width,
303+
alignItems: 'center'
279304
}
280305
});
281306

@@ -285,7 +310,7 @@ const mapStateToProps = (state) => {
285310
loading: state.randomData.loading,
286311
error: state.randomData.error,
287312
isRenderFooter: state.randomData.isRenderFooter,
288-
mainThemeColor: state.themeColor.mainThemeColor
313+
mainThemeColor: state.settingState.mainThemeColor
289314
};
290315
};
291316

js/containers/HomeTab/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ const mapStateToProps = (state) => {
187187
hasData: state.homeData.hasData,
188188
dataSource: state.homeData.dataSource,
189189
dataTime: state.homeData.dataTime,
190-
mainThemeColor: state.themeColor.mainThemeColor
190+
mainThemeColor: state.settingState.mainThemeColor
191191
};
192192
};
193193

0 commit comments

Comments
 (0)