Authored by 于良

个人中心我的回复列表数据显示不全优化 review by 阿瑟

... ... @@ -4,7 +4,6 @@ import React from 'react';
import ReactNative from 'react-native';
import ScrollableTabView, {DefaultTabBar} from 'react-native-scrollable-tab-view';
import ImmutablePropTypes from 'react-immutable-proptypes';
import UserCenterTop from './UserCenterTop';
import CommunityList from './CommunityList';
import ReplyList from './ReplyList';
... ... @@ -233,6 +232,9 @@ export default class User extends React.Component {
page={0}
endReachedViewHeight={this.initialPageHeight}
endReached={this.props.endReached}
onContentSizeChange={() => {
this.scrollableTabView && this.scrollableTabView.goToPage(this.currentPage);
}}
/>
<CommunityList
... ... @@ -249,6 +251,9 @@ export default class User extends React.Component {
page={1}
endReachedViewHeight={this.initialPageHeight}
endReached={this.props.endReached}
onContentSizeChange={() => {
this.scrollableTabView && this.scrollableTabView.goToPage(this.currentPage);
}}
/>
<ReplyList
... ... @@ -262,6 +267,9 @@ export default class User extends React.Component {
onPressPost={this.props.onPressPost}
endReached={this.props.endReached}
endReachedViewHeight={this.initialPageHeight}
onContentSizeChange={() => {
this.scrollableTabView && this.scrollableTabView.goToPage(this.currentPage);
}}
/>
</ScrollableTabView>
... ...
... ... @@ -205,9 +205,6 @@ export default function user(state = initialState, action) {
case USER_UNREAD_SUCCESS:
return state.setIn(['profile', 'msgCount'], action.payload);
case USER_UNREAD_FAILURE:
return state.setIn(['profile','error'], action.payload);
case USER_AVATAR_UPLOADING:{
let nextState = state.set('avatarUploading',true).set('avatarUploadError', null);
return nextState;
... ...
... ... @@ -57,7 +57,6 @@ export default class UserService {
return response.json().then(
(json) => {
console.log(json);
if (json.code == 200) {
return json.data.imagesList[0];
}else {
... ... @@ -68,8 +67,6 @@ export default class UserService {
}).catch((error) => {
console.log('wwwwwwwwwwwwwwww');
console.log(error);
throw(error);
});
... ...