Authored by 孙凯

当所有亲求都结速的时候才刷新页面 review by hongmo

... ... @@ -150,11 +150,11 @@ export default class Detail extends Component {
detailOtherArticle: [otherArticle],
};
let isFetching = content.isFetching;
let isFetching = content.isFetching || article.isFetching || author.isFetching;
return (
<View style={styles.container}>
<ListView
{!isFetching?<ListView
ref={(ref)=>this.listView=ref}
contentContainerStyle={styles.contentContainer}
enableEmptySections={true}
... ... @@ -162,7 +162,7 @@ export default class Detail extends Component {
dataSource={this.dataSource.cloneWithRowsAndSections(dataSource)}
renderRow={this.renderRow}
renderHeader={this.renderHeader}
/>
/>:null}
<LoadingIndicator
isVisible={isFetching}
/>
... ...
... ... @@ -48,19 +48,20 @@ export default class Header extends React.Component {
let author_data = author.get('data');
let article_data = article.get('data');
let hasData = true;
if (!author_data || !article_data) {
return null;
hasData = false;
}
let author_desc = author_data.get('author_desc');
let author_avatar = author_data.get('avatar');
let author_name = author_data.get('name');
let author_url = author_data.get('url');
let author_desc = hasData?author_data.get('author_desc'):'';
let author_avatar = hasData?author_data.get('avatar'):'';
let author_name = hasData?author_data.get('name'):'';
let author_url = hasData?author_data.get('url'):'';
let num = this.getStrSize(author_desc);
let article_title = article_data.get('article_title');
let pageViews = article_data.get('pageViews');
let publishTime = article_data.get('publishTime');
let article_title = hasData?article_data.get('article_title'):'';
let pageViews = hasData?article_data.get('pageViews'):'99999';
let publishTime = hasData?article_data.get('publishTime'):'12月12日 12:00';
return(
<View style={styles.contentContainer}>
<TouchableOpacity activeOpacity={0.5} onPress={() => {
... ...