Skip to content

Commit

Permalink
最后做一些小改动,准备发布0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardCao authored and RichardCao committed Feb 5, 2016
1 parent c0cdf86 commit 85793d7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def enableProguardInReleaseBuilds = true

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
buildToolsVersion "23.0.2"

defaultConfig {
applicationId "com.reading"
Expand Down
2 changes: 1 addition & 1 deletion app/pages/About.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class About extends React.Component {
source={require('../img/about_logo.png')}
/>
<Text style={{fontSize: 16, textAlign: 'center', color: '#aaaaaa', marginTop: 5}}>
v0.1.2
v0.1.3
</Text>
<Text style={{fontSize: 28, textAlign: 'center', color: '#313131', marginTop: 10}}>
Reading
Expand Down
7 changes: 5 additions & 2 deletions app/pages/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const propTypes = {
var canLoadMore, currentTypeId;
var page = 1;
let typeIds = [0, 12, 9, 2];
var loadMoreTime = 0;
let categories = {0: "热门", 12: "点赞", 9: "科技", 2: "段子"};

class Main extends React.Component {
Expand Down Expand Up @@ -101,12 +102,14 @@ class Main extends React.Component {
}

onEndReached(typeId) {
if (canLoadMore) {
let time = Date.parse(new Date()) / 1000;
if (canLoadMore && time - loadMoreTime > 1) {
page++;
currentTypeId = typeId;
const {dispatch} = this.props;
dispatch(fetchArticles(false, false, typeId, true, page));
canLoadMore = false;
loadMoreTime = Date.parse(new Date()) / 1000;
};
}

Expand Down Expand Up @@ -186,7 +189,7 @@ class Main extends React.Component {
renderRow={this.renderItem}
style={styles.listView}
onEndReached={this.onEndReached.bind(this, typeId)}
onEndReachedThreshold={15}
onEndReachedThreshold={10}
onScroll={this.onScroll}
renderFooter={this.renderFooter}
refreshControl={
Expand Down
1 change: 1 addition & 0 deletions app/pages/WebViewPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ class WebViewPage extends React.Component {
domStorageEnabled={true}
startInLoadingState={true}
scalesPageToFit={true}
decelerationRate="normal"
onShouldStartLoadWithRequest={true}
onNavigationStateChange={this.onNavigationStateChange}
renderLoading={this.renderLoading.bind(this)}
Expand Down

0 comments on commit 85793d7

Please sign in to comment.