Authored by 于良

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

@@ -4,7 +4,6 @@ import React from 'react'; @@ -4,7 +4,6 @@ import React from 'react';
4 import ReactNative from 'react-native'; 4 import ReactNative from 'react-native';
5 import ScrollableTabView, {DefaultTabBar} from 'react-native-scrollable-tab-view'; 5 import ScrollableTabView, {DefaultTabBar} from 'react-native-scrollable-tab-view';
6 import ImmutablePropTypes from 'react-immutable-proptypes'; 6 import ImmutablePropTypes from 'react-immutable-proptypes';
7 -  
8 import UserCenterTop from './UserCenterTop'; 7 import UserCenterTop from './UserCenterTop';
9 import CommunityList from './CommunityList'; 8 import CommunityList from './CommunityList';
10 import ReplyList from './ReplyList'; 9 import ReplyList from './ReplyList';
@@ -233,6 +232,9 @@ export default class User extends React.Component { @@ -233,6 +232,9 @@ export default class User extends React.Component {
233 page={0} 232 page={0}
234 endReachedViewHeight={this.initialPageHeight} 233 endReachedViewHeight={this.initialPageHeight}
235 endReached={this.props.endReached} 234 endReached={this.props.endReached}
  235 + onContentSizeChange={() => {
  236 + this.scrollableTabView && this.scrollableTabView.goToPage(this.currentPage);
  237 + }}
236 /> 238 />
237 239
238 <CommunityList 240 <CommunityList
@@ -249,6 +251,9 @@ export default class User extends React.Component { @@ -249,6 +251,9 @@ export default class User extends React.Component {
249 page={1} 251 page={1}
250 endReachedViewHeight={this.initialPageHeight} 252 endReachedViewHeight={this.initialPageHeight}
251 endReached={this.props.endReached} 253 endReached={this.props.endReached}
  254 + onContentSizeChange={() => {
  255 + this.scrollableTabView && this.scrollableTabView.goToPage(this.currentPage);
  256 + }}
252 /> 257 />
253 258
254 <ReplyList 259 <ReplyList
@@ -262,6 +267,9 @@ export default class User extends React.Component { @@ -262,6 +267,9 @@ export default class User extends React.Component {
262 onPressPost={this.props.onPressPost} 267 onPressPost={this.props.onPressPost}
263 endReached={this.props.endReached} 268 endReached={this.props.endReached}
264 endReachedViewHeight={this.initialPageHeight} 269 endReachedViewHeight={this.initialPageHeight}
  270 + onContentSizeChange={() => {
  271 + this.scrollableTabView && this.scrollableTabView.goToPage(this.currentPage);
  272 + }}
265 /> 273 />
266 274
267 </ScrollableTabView> 275 </ScrollableTabView>
@@ -205,9 +205,6 @@ export default function user(state = initialState, action) { @@ -205,9 +205,6 @@ export default function user(state = initialState, action) {
205 case USER_UNREAD_SUCCESS: 205 case USER_UNREAD_SUCCESS:
206 return state.setIn(['profile', 'msgCount'], action.payload); 206 return state.setIn(['profile', 'msgCount'], action.payload);
207 207
208 - case USER_UNREAD_FAILURE:  
209 - return state.setIn(['profile','error'], action.payload);  
210 -  
211 case USER_AVATAR_UPLOADING:{ 208 case USER_AVATAR_UPLOADING:{
212 let nextState = state.set('avatarUploading',true).set('avatarUploadError', null); 209 let nextState = state.set('avatarUploading',true).set('avatarUploadError', null);
213 return nextState; 210 return nextState;
@@ -57,7 +57,6 @@ export default class UserService { @@ -57,7 +57,6 @@ export default class UserService {
57 57
58 return response.json().then( 58 return response.json().then(
59 (json) => { 59 (json) => {
60 - console.log(json);  
61 if (json.code == 200) { 60 if (json.code == 200) {
62 return json.data.imagesList[0]; 61 return json.data.imagesList[0];
63 }else { 62 }else {
@@ -68,8 +67,6 @@ export default class UserService { @@ -68,8 +67,6 @@ export default class UserService {
68 67
69 68
70 }).catch((error) => { 69 }).catch((error) => {
71 - console.log('wwwwwwwwwwwwwwww');  
72 - console.log(error);  
73 throw(error); 70 throw(error);
74 }); 71 });
75 72